Revert refactor

Revert the refactor (moved to [feature branch](https://github.com/stellar/stellar-lib/tree/major-refactor)).
Apply #25 and #26.