Fixed #17; Removed global variable `root`
Fixed #18