Added tests for d0, and comments which include covering how the base functions work.