Fixed problem with surrounding elements
Major refactoring of SubComponent
Re-enabled header merging