do_work pointers and newlines

Made do_work functions take a pointer and added newlines to output
tables