Math fixes and example setup

Made final fixes and completed testing. Check out the example
Root_Adjustment.html to see how it works.