Cleaned code to read cell data