Cleaning up naming, event handlers, and some threading issues.