fixed imports, decided some other TODO items were either unimportant or had been mostly met.
testing with no  barrier; pushed max_tiles into separate function while testing an optimization that didn't work out.