Improvements + more tests