Improve exception on empty/used stream. Clean up some code a bit
Merge pull request #7 from maxmind/greg/better-exception

Improve exception on empty/used stream. Clean up some code a bit