Modifying examples and little refactoring