Started refactor and comment