Move unset function to main