Rework to add proper commandline options