Remove unused imports, and separate elements and previewers from the timeline code