Reworking the logic to use reflection to invoke the profile / no conditional compilation