Fixing duplicate trace, adding few tests.