Improvements, more tests