Fixed build, added command line options