Clean up and DRY-ing