added documentation, some minor method/class name changes