Fix1 - Changed unhookVariable to accept function as additional parameter.
Fix2 - Changed the I/F of hookVariable/unhookVariable to prevent the getter from returning stale values after the setter is removed.