Performance improvements + update department query parameter