Remove stray import. Tighten adding-spaces function