Refactor toggleSublist plug to have new plugin pattern