Performace fixes + copy for terms and stuff