Improved the code to better follow CryBlend guidelines