First Working version, just for Factorial and integer data type. [Dirty version]