Removed some redundant debug functions.
Added some doc.
Improved "documentation."