Refactors properties into closure scope