General Refractoring and update