Added some conditional debugging functions, updated trace functions to variadic templates