Glasser's comments on my diff

* Lots of small things like whitespace fixes
* change the way adding a custom type works