Making a few adjustments to the code