some cleanup as well as breaking into lines