Minor tweak to wrap code in a Run function and call Run from ready.