Rm unused variables, undef SQ macro after use