Added command-line argument interface, did a little cleanup