moved to registry and event loop, removed unused files