Refactor extra code from ideasController