Cranked up cookie functions a bit
Add PHP version check