Tilemap collision working but needs speeding up