Adding debugging
Various additions