remove unused imports
replaced duplicated string literal by constant
refactor method flow