adding help option
adding range check
whitepace cleanup
Merge pull request #3 from silfreed/master

Merged in silfreed's changes (thanks very much!)