Clean up example code to remove var-decl's where they aren't needed