Improve package tree, add threadlocal mangement, add page validation and page object