Few performance optimizations