Fixed #3433. Using get_bin_path, removed uneeded imports, "module" is inlined, misc other style improvements.
Merge pull request #3453 from jsmartin/cleanup

Fixed #3433. Using get_bin_path, removed uneeded imports, "module" is in...