Code re-structuration