Remove unused variables, add compile flag for it