Started code and tests, this is still a work in progress.