Added tests and updated readme