Add gateway library
Add examples in readme