Unneeded function calls replaced by direct code.