Remove unused variables in global scope and namepsaces

Related to #12