Refactor of Uniform logic