ADD: RunInPageContext

Also fix bug in add_badge_completion_cost function