Implementing refund command handling.
Implementing transfer command handling.
Refactoring: Moving factories module to a dedicated file.