doc improvements and code cleanup
Merge branch 'api_v2' of github.com:chinchliff/oti into api_v2