Refactor setup methods.