Reimplemented some outdated queries