Refactors attributes structure away from array towards hash