Tidied code. Finalized physics demo.