Moved code from Planets to new template.