Fix some bugs and rename getChildren to list