Fixes, performance tweaks