- Refactored twisted code.
- Moved write_lock to shared dictionary instead of
passing it between threads (WriteProtectedDict utility class)
cleaned up code formatting
Removed unnecessary WriteProtectedDict