Improving internal code