Added fndef to header, started adding docs