add examples and small cleanups