Separated some functions.