Moved command-line parsing into constructor