So shouldn't it be possible to either allow the theme to access the variables it needs from the system module, or include an appropriately modified "function b_system_main_show()" directly in the theme?
(By way of a disclaimer, my PHP knowledge is pretty basic at this point, which is why I ask lots of annoying questions. )