removed extra calls to db()->getLink() and made the db automatically connect at startup.