Altered database implementations

The biggest change is that the courses have been converted to
jsonarrays and then converted to strings and stored in the db as
strings. They have been read out as strings and converted back to
course objects. Not sure if this is inefficient though.