Added comments, implemented some more of the function parsing.