Refactor the IDE code.