Split main process code and added development mode
Now properly daemonizing
Fixed some JSHint warnings