Modernize the code