Remove useless code to improve performance