Fixed a bug where the wrong number of tiles wide was being reported.  Removed some duplicate code to fix this.