Refractored Code