Modularize client and physic updates. Fixed delegate bug. Cleaned up code.