Introduce control thread and sync mechanism.
Enum naming consistency.