Fixed the examples and added updateLoop for animation