Replaced slice() with readSlice() where appropriate.