Removed printleaves method and just print straight in loop.
Fixed loop bug when printing leaves