Added tests and changed to not clear all collections if collection name is empty