Code cleanup removing dead vars