Mm326

Code cleanup and API standardization.

#326