Separated tpfc.py into models and views.