Clean up hash
Better hash encoding