Optimized imports
Minor refactoring, began implementation of events.