Added docs with expects usage examples
Use lambda instead of named function