Some indentation for readability in CMTest. Added NullPointer checks for
add method.