Code cleanup/organizing
Support for extensions + import extension