Tidying up stack trace printout for function calls