added command line options, fixed some stuff