Added command line argument parsing and the ability to run forever.