Performed some optimizations :)