Added tests
Small fixes