extended physics, added sword and refactored code