Get rid of em-synchrony depedency and add tests