Making some of the examples work again

This makes some of the examples work again. Although now all of them
are working now but this commit updates some of the examples atleast.