Updated passer code

This change has several modifications. Mostly restructuring but also
adding debug outputs.