Minor optimizations and tidying up.
Updated example.
Updated keywords.