Functional collecting unique ranges; split to visual; created main