Removed the use of anonymous functions.