Added python example, various fixes