Added getExtension method.