added documentation and renamings