Documentation for service event dispatching and some cleanup.