Refactor to logic into static helper methods