code clean up

cleaned up some unnecessary lines, converted comments to proper
documentation, and added a setting for automating the run location