add container element, remove unused HTML