Refactor code using presenter