Commented, cleaned tree library, added priority to tree