Documentation refresh
Add function comments, small fixes