Local implementation code.