Fixes for mm.js found via the tests
Additional tests for other functions
Comments added to new tests