added some efficiency changes, and corrected cell width and height roundoffs