Fixed some warnings
Add some debug
Remove useless code