some cleanup and typo fixes.
Merge branch 'test' into dev