Removed unneeded function in factory