General Update

Improved code and debug options including more outputs