More changes and factorial implementation 2x slower than kressi's :(