Reorganize tiled.lua

Moved "public" functions to the top.
Player movement!

No collisions yet. I'm working on it!