Added a way to differentiate in between folders and groups