Cleaned up priority q and created a tree class