style tweaks & dead variable removal