Added cookies and deleted some hard code.