Performance and cosmetic improvements

Performance and cosmetic improvements