removed some debugs, and improved comments