A complex pull request which replaces every sql query instance in Links Module with queryDB()