See description for details

* Changed factorial implementation to fix bug
* Changed some int values to float for certain functions