I want to write a simple tree plugin, prefer to use mvc pattern