Split view.py into multiple smaller files