Refactor
Move intermediate output into dedicated module
Move final output code into dedicated module
Created type alias for item vector