Added factorial function + tail-recursive factorial function