Refactor half