Some swapping around of "typename" statements that seemingly was needed for compilation on the mac...