Phew... that took a while to figure out how scala reflection works.