More cleanup
Rewrite from scratch, reflection-oriented