formatting updates and some unnecessary line removal