style suggestions for removing some repeated code in models.py

suggestions for cleaning up the code a little bit.