This function and the functions below it use the "non-standard" braces (as discussed in my nit above).

Also, for the public functions, scaladoc would be useful IMO.