Reorganized project layout; added tests for gameloop