Pull tile handling functions into their own file