Centralised some duplicated code