unit tests, basic data annotations and fixes to reflections