initial commit
heavy refactoring, added more CLI params