Add example & some code fixes