Cleaned this repo up and made a unit test