Changed the views to generic views
FIxed bug in models