Encapsulated functions.