First work on OO refactor. Test still pass.