Fixed parallel function issues; currently running successfully though results need checked.