Fix bug in the assert macro.
Use reader-writer locks for classerver
Minor cleanup & clarification