Code encapsulation