Made cookie abstraction more reasonable