Reoganized functions.