Refractoring and replacing two gif files