closes #2 Class based views

Refactored code to generic class based views
closes #2