Refactor atoms