Refactoring and ressurecting
Added clearice for command line parsing