moved charset to package object; implemented LooseTree
implemented tree object parsing