Removed $cookies dependency