Removed unused statemachine.js, added readme, changed some code style