Implement TreeElement class

Implement TreeElement class which contains TreeItem object and a key.