Optimize some stuff