Refactoring for sexcoin