Clean up generation, grid printing, pep8