Minor code organisation