Refactoring, extract constants
updated command line interface