Moved all query logic to models, implemented strong consistancy for the datastore using ancestors