Clean up event enums and related event handler code, implement first bits of master params.