A bit of refactoring
Add a bunch of docs.
Fix name