Update models.py

Minor formatting and rewrite. Bug testing starts tonight/tomorrow, but this should be a tighter approach with a bit less overhead.