Some performance tweaks