Updates

Update for deprecated PHP functions, bug fixs