Updated the tree parsing so that it supports different data types. Some classes still require updating.