fixed cases of some variables within the functions, and also variable ty...

...pos

Some variables were specified like productID in the function method however in the function code they were mentioned as productId also fixed a couple of typo's in variables.