Refactoring DAO layer and make some changes in view layer