Reorganized functions.