Fixes, add new tests