Add class debug

All debug things are now in a class.