Fix #2 -- add a ton of function tests