Added options and trace class.
Trace is disabled by default. (define TRACE_ON macro to enable it.)