Remove all non-essential dom and require() dependencies from application files and move them into app/main.