Add element
Minor refactoring