Code refactor - extract some new methods