Make setting CSV and initializing the page a function instead of loose code.
merge conflicts