Cosmetic and performance fixes