Dataset now parsed once in ui.js, passed as parameter

This makes the code much cleaner. Instead of being repeatedly read from
the file, the dataset should simply be passed around between the various
files.