Corrected docs, added comments