Added tests and stuff