Polish refactor