Refactor binary