[#18] Code optimizations