Improved encapsulation for pass.
Improved organisation of output.