Wrapping code into a function internally.