Changed return type in model queries, added tests for model object