clean up a bit
refactor some functionality out of the main class.
update README.