Initial transition to more modular encoding process.
Fixed Opus termination issue.