Implements handling of command line options