Fixed usage of correct body when ordering lists. Also made the code easier to read.
Added library class to make it easier to use custom editors inside other editors.