Bugfixes and improved comments

Command line argument handling is now whitespace-safe.