Cleanup

Bit of code cleanup, less extra actions, usage of `tempfile`, help about switches.