Factor out most non-DOM related methods into new files
Remove unnecessary imports of unused classes