removing constant declarations where things broke and adding missing mask var