big refactor

thanks @tmeasday !
version bump
Merge branch 'refactor'