Reorganized code and added --force feature

Broke down some code and put into functions. Added ability to use
--force for starting/stopping the app. Made use of $() consistent.
Double quotes consistency. Added double quotes everywhere. More/better
logging. More/better checking for app running