Added tests among other things