Clean out the comments and reorganize code in run_lock.rb