Removing non used elements.