1. Added switch (-d) that allows user to run moco in deamon mode or not
2. Refactored names of scripts
3. Added generated log and pid files to .gitgnore
4. Added shutdown hook for deamon version of moco that deletes the pid file
5. Refactored code