Minor changes on the code