code refactor remove Global constants