Reintroduce events module and revert api module to not having an extra exports layer.