Initialize function for printing, fixed bugs on no lineitem error, much more