Moved code from README to examples