Moved all the constants in config.php, new config loader class, bugfixing.