More changes to refactor