Refactored seriesdb into database as it now contains more than just
seriesdb functions. Fixed some old functions, how URLs were found, and
added meta information.