Add example and some fixes