Made stateless classes static to allow unhooking of hooks

Closes #5151