clean up and working binary tree