Slight optimizations and UI fixes