Added 'var' for all variables in example code