Moved -cookies implementation down together with other private methods.