Changing classes to models