Some slight refactoring of tests and datetime format builder
Some more test refactoring
Covering some more test cases