Splitting the FileViewer JS into another file