Moving filtering to client side and improving caching