address comments in views and templates
update middleware
update models
update tests