Fix a typo
Move unused class out of core.
Remove trivial warnings
Change reading to use IOUtils methods.
Fix bug, separate out some methods, add tests.