Refactored reflectionhelper