Fix unused variable warnings
add test suite
Add (failing) tests