Refactored using generic class based views