Made setup dependant and split database

Made initial setup dependant on the localStorage variable being
available - the code won't even run if it's present. Moved the exam
database into it's own files, to make everything easier to handle.