Add tests for models and reorganize test directory