cleaned up calc/ui update code, allow for substitute calculation fn via options