Added tests. Finished version 1.0.