Reformated all examples and fixed test suite