Added << operator
some minor changes
added reductions with print functions
changed printItems to work with every outputstream