remove a few unused and duplicated variables