Updated code to use using aliases. No need for typename and ::type.