Added a debug grid and help functions

Added a debug grid and functions to support tiles, available checker and
random.