Reorganise+reformat imports. Add registration for GUIs, move registration of Events to IProxy.