Aggressive cleanup

Ran over entire project with ReSharper, then heavily condensed the
horribly written ReadByteArray function.