Algorithm implementation finished, Tree class still needed