Split types out into their own files.
Add extension method that looked useful from Stack Overflow.