Extracted reflection code out into a utility class making it easier to use and read