Beat cloud and refactorings.

Some physics refactoring as well as main class refactorings.