Move external functions into knockout viewmodel scope.