Support change mode to disabled and clear managed items

And fix eclipse problems