move some methods into private.