Various changes to the engine and setup basic unit testing with test.php