Added comments and correct identation