Main mesh tracing code moved to one central function, added setupTileIndices, added addSolidTile