minor refactoring, tile id, first collision