Minor changes to the code