Added new test helper method that allows to set the compactArrays option
Several bugfixes to removeBase and compact methods.
All tests should pass by now.