Refactor and split chip selector