Fix function typo during recursive call and remove trailing whitespaces

Current factorial method have *fact* during recurive call which causing exception. Also there were some trailing whitespace here and there.