Rework crate to use events and made more things private