Added command line options
Clean up comments and warnings