Added advanced example and fix few problems.