Added pipeline throughput calculation.
Separate execution and library code.