Made some code cleanups and use of module.run_command