Custom Cookoie methods repaired, added validity and error checking