Changes in order to refactor code