Refactor and comments made