Added support for dbstats and stats.
Made module work with https.