Replaced copy&paste function names by function name variable.