Use query parameter for optimize calls, add refreshAll