Core-589 Code optimization