Add remove() test and other minor fixes