Refactor register parts