Change dom control codes to improve performance