dagaz code clean up