Various tweaks to improve DB searches