Refactored ReflectionUtils

Removed vars and added a few tests.