Refactor bin