Some refactoring. Need to decide how to implement box2d