Added unit test and logic for determining if a square is valid.  Killer feature #1.