Refractored HTTP and added cookies get/set methods.