Added some tests, they are failing. Still need more work. Bed time now though.