Some reshuffling of methods and formatting.