Updated to the highest optimization standards