Changed from pushing output to array to printing to file handle reference. Changed item(), value(), header(), alert() to add newline to the text they return so a newline didn't have to be added to every call.