Split functionality into smaller, more extensible methods.
Update README.md.