move ABTesting to a more suitable location

add register_globals function