Tests are compiling. some more fixes for main code