Functions clean-up