Some improvements int share code