major refactors, extension is functional but not quite polished