Quick code review, etc.

Fixed typo in README.
Refactored and added implementations for a few constants and functions.
Added implementations for a few generated functions.