Fixed the reading of thk, and fixed the filling of background from searise data.