My code was causing memory crashes, so I've stripped it down until it runs. Now I have to figure out how to add back what I removed without causing crashes again