Finish forward ad implementation and add example of chain rule and
example usage of ad.