Added tests and state