Code refactor changes