added commandline options, leaking memory like a bad program (it is)