fixed issues in the cmdline and other cleanup

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>