organizing, removing duplicates and unnecessary dependencies