Minor fixes

Updated comments to specify parameter types. Also fixed factorial
function.