Added case switcher to tile.m for quicker and more efficient code.
Blah