Refactored command line parameter parsing

Signed-off-by: Christopher.brandt <xtopher.brandt@gmail.com>