More optimizations to the integral function, and implemented the t-distribution function