Clientside statemachine modularization
Cleaned up file system
Cleanup in js files