Cleaner and more async version of prime.js using code from fibonacci.js