Added grid class, color class, tile class and some minor changes