fixed some bugs, removed all reflections, improved tests