fixed removing type form some elements, tidy of comments, added timeout to allow page to display before starting element export