End of new refactor