Added a debug tool
Merge debug tool with master