Modified some details on the code