Update Examples to cleaner code

Now console will log errors the examples produce errors.