Renamed file. Added comments and validation of input params