some refactoring. Java doesnt like using the testlayer with box2d