Rebase: Improvements to knockout function.