Fixed return values
Added Trace namespace
Added unit tests