PHP version support

Changed pages to be compatible with < php5