Updated tutorial codes to compile with latest version v0.2.2.