Implemented Factorial.
Added factorial implementation.