Big update to tile related code [ci skip]

Know bug: This will break the rendering