views.py refactoring
JavaScript moved to external file