Continuing WIP - this got a lot bigger than I thought