Changed pyfits to astropy and added comments