Initial implementation and spec tests.

I think I'm okay with leaving it at this point... It's not all that much code. :)