Don't redeclare hex2bin if it already exists (it's a native function in php >=5.4)
Fix a load of warnings that occur on galaxy map.