modified how tile gets registered so the implementer doesn't have to think about it.
reformatted the code