Some small policy handler improvements + endian support