some reflection tests and refactoring