test for #252
don't use Options.parse anymore
don't use Options.parse anymore
remove a lot of duplicate code
remove unused stuff
work on #252