Fixed typo in README.
Refactored and added implementations for a few constants and functions.
Added implementations for a few generated functions.
Merge pull request #1 from doyleyoung/code_review

Quick code review, etc.