A bit of some cleanup and more extension support