Moved Model, added test cases