Updated indents and added comments
Changed resizing method and added comments