refactor + gc optims