Move views.py to views/, and refactor file view