Added variable declarations to examples