Added new timing code. Better parallel support