Improve argumentsSlice and add tests