Physics

Basic physics and refactoring