Refactor and update feedback message
Reorganise code