Binary Tree functions for C