Improve documentation, sample usage, grammar, and type validation