additional style changes and some minor code cleaning as a resiult of it