improvements to extension management code organisation