better regex handling, and making tile index optional