I think this is almost ready to go

Ignore the crappy test, I have to come up with a good test case.