Update readme, and refactor functionality into the right files.