Encapsulated remaining functions into anonymous functions.