Added command line argument parsing. Fixes #2