formatting changes

reformatted so smaller chunks w/ more comments outside