Fix some typos and improve documentation.
Implement some of the build logic and architecture refactor.