Greatly Improved Debugging Framework

Greatly Improved the testing framework and debugging capabilities.