General cleanup
Add missing format specifiers in format string
Make join_p global; fix output whitespace