Refactor argument parser into more classes.