let tricksInternal = {
  Kickflip: {
    'Pop Shuvit, Backside': { name: 'Varial Kickflip', aliases: ['Kickflip Shuvit', '180 Flip'] },
    'Pop Shuvit, Frontside': { name: 'Hardflip' },
    '360 Pop Shuvit, Frontside': { name: 'Tre Flip', aliases: ['360 Flip'] }
  },
  Heelflip: {
    'Pop Shuvit, Frontside': { name: 'Varial Heelflip', aliases: ['Heelflip Shuvit'] }
  }
};

/**
 * Return a list of fundamental tricks.
 * @param {String} [trick] If provided, return a list of fundamental tricks that can be combined
 * with trick.
 * @return {Array<String>} Fundamental tricks
 */
export function list(trick) {
  return Object.keys(trick ? (tricksInternal[trick] || {}) : tricksInternal);
}

/**
 * Given a list of fundamental tricks, return the trick that is a combination
 * of the provided tricks.
 * @param  {...String} tricks Fundamental tricks
 * @return {Object} Returns an object containing the trick data, or undefined if
 * the list of fundamental tricks does not resolve to a known trick.
 */
export function resolve(...tricks) {
  let resolved = tricksInternal[tricks.shift()];

  tricks.forEach((trick) => resolved = resolved[trick]);

  return resolved;
}

@@ -16,16 +16,540 @@
 nal = %7B%0A
+  Hardflip: %7B%0A    'Late Backside 180': %7B name: 'Ghetto Bird', excludeReverse: true %7D,%0A    '360 Body Rotation, Backside': %7B name: 'Diamond Flip', excludeReverse: true %7D%0A  %7D,%0A  Heelflip: %7B%0A    'Pop Shuvit, Frontside': %7B name: 'Varial Heelflip', aliases: %5B'Heelflip Shuvit'%5D %7D,%0A    'Pop Shuvit, Backside': %7B name: 'Inward Heelflip' %7D,%0A    '360 Pop Shuvit, Frontside': %7B name: 'Laser Flip', aliases: %5B'Frontside 360 Heelflip'%5D %7D,%0A    '360 Pop Shuvit, Backside': %7B name: '360 Inward Heelflip', aliases: %5B'Mainecoon Flip'%5D %7D%0A  %7D,%0A
   Kickfl
@@ -717,37 +717,36 @@
 360 Pop Shuvit, 
-Front
+Back
 side': %7B name: '
@@ -783,33 +783,19 @@
 '%5D %7D
-%0A  %7D,%0A  Heelflip: %7B%0A    '
+,%0A    '360 
 Pop 
@@ -827,63 +827,459 @@
 e: '
-Varial Heelflip', aliases: %5B'Heelflip Shuvit'%5D %7D%0A  %7D%0A%7D;
+360 Hardflip'%7D%0A  %7D%0A%7D;%0A%0AmergeInverse();%0A%0Afunction mergeInverse() %7B%0A  Object.keys(tricksInternal).forEach(function (key) %7B%0A    var trick = tricksInternal%5Bkey%5D;%0A%0A    Object.keys(trick).forEach(function (innerKey) %7B%0A      var innerTrick = trick%5BinnerKey%5D;%0A%0A      if (innerTrick.excludeReverse) return;%0A%0A      if (!tricksInternal%5BinnerKey%5D) %7B%0A        tricksInternal%5BinnerKey%5D = %7B%7D;%0A      %7D%0A%0A      tricksInternal%5BinnerKey%5D%5Bkey%5D = innerTrick;%0A    %7D);%0A  %7D);%0A%7D
 %0A%0A/*

Add tricks and merge inverse keys into the root