Added comments and minor changes to passing of the salary variable