add option parser, added consts, fix whitespace