Code clean up getting ready to do output