* moved some utility structs out of the clesses and into the namespace
* chnages to make the code compile under g++ because it doesn't like unions of anonymous structs of classes with constructors :(