Completed Parameter Validation and added explanatory comments