Refactoed table generator. Fixed previously visited, but blocked, location bug. Can't block diagnoal yet...