Add closing elements and fix indentation