Updated with Inverse functions

Added new comments and function definition to check cache for
calculation, solve if not cached and cache new solution