Setup GTest environment and some bit twiddling