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

...lined, misc other style improvements.