Fix bug in the assert macro.
Use reader-writer locks for classerver
Minor cleanup & clarification
Merge pull request #476 from linas/master

a few annoying performance-related bugfixes