Added tile.c

now we can do some tiles and hopefully it will be faster