Refactored code, plus upload tilesheet