Made some major optimizations to the fifth Project Euler solution