Closes issues #3, #4, and Vladec/matching-engine#5