before splitting load modules
saving of expanded and collapsed state
some colouring