Scaladoc and formatting cleanup