removed dead code and ran wmlindent