added more documentation and fixed a bug in FunctionRing discovered when doing docs. nice.