Added missing comments and fixed indentation