Code Changes to improve performance.