fix typos and adjust indentation and spacing