Add tests for docosade change edge cases
Tidy up docosade calculation