Added debugging
Improving documentation