Code updates.

Added readonly keywords, replaced mutexes with synchronization objects.