Add call context change in hooks

Changed context handling from hooks to prolog