Fixed indentation and added some comments.