extract create sort
add message socket tests
Merge pull request #30 from lipp/refactor-sorter

Refactor sorter