Added smarter use of console.debug.apply() instead of loops, etc.