some optimizations in the UI