[minor] Small code reorganisation