Added command line arguments again and minor fixes