PHP 5.5 Compatibility

These are changes that are needed to support PHP 5.5.  So far this appears to be /e preg_replace fixes.  This has required changing over to callbacks and some curry functions.  Everything changed will need testing.  I've done testing to ensure things still appear to work, but am not sure if I missed something in testing.  I am also not sure if I missed any or any other 5.5 replacements are needed.