Added tests, everything works.