added check for circular dependencies
cleaned up the code
fixed bug with multiple licenses objects not showing