Grouping logic in one class to make it cleaner and reuse some code.
Depends on D8659
Build iOS and Android and play with messages to make sure functionality still works.
rebase