Implemented command line parsing.