Refactored code from View to Presenter