updated FirstFactorial.js with better base case definitions