final changes

corrected comments, added documentation draft, deleted unused functions