Add attributes to avl functions

This PR redoes #140
Same here. The `nonnull` should be omitted.