Added test and other changes