Altered Stack and related tests to use newlines as delimiters when printing the stack