Migration added and templates and controllers modified