Some code style fixes, command line options added.