Feature/plantree and scheduler

Architecture will be totally changed from this PR.
But some codes are yet useful.
Merge to master.