Refactor editor theme management