fixed some string encoding issues. Added better command line usage help.