Clean up to avoid unnecessary http requests