comments on tile generation code