Fixed few parsing issues and uses more of the options given