refactored the structure of the application for better code organization and fixed issues with devise 3.1 and password recovery