Global namespace added and debug functions added