minor optimizations and UI tweaks