Cleanup
Type fixes
Add documentation reference