Encapsulate example programs