Implemented home profile view and refactored code