change storage to use a Map instead of Array, foundation for freceny #WIP