Debugging cleanups, and fix formatting of debugging messages on ARM