Some reformatting and reshuffling of methods.