Major performance tweaks