add early code to add virtual gateway or SMSC, to get gateway by calling gateway_get() instead relying on $gateway_module or $core_config['main']['cfg_gateway_module']
more gateway_get() on lib/*
more gateway_get() to replace $gateway_module
more on replacing $gateway_module
update init to properly load gateway, themes and language module
add ob_end_clean() before pushing die() messages