Refactored views.py to make it cleaner and moved utility funcs to utils.