Little refactoting, cmdline options, different image convertions

Stash and Andrew414