Copy and cleanup config