small adjustments and additional inline documentation