Cleanup and ddocumentation improvements