Move spec DSL methods into own file
Fix bug with code not correctly using date in query