refactor(index): various fixes applyed

 * Used Array.prototype.map second argument, instead of bind
 * parentLevels now returns levels object (that was graphs)
 * Some additional functions to help understand code