refactored trace messaging
moved libraries