made changes from mauro's comments
moved DOM stuff out of the log viewer controller