Refactoring Coin for docs ... also added an API