Code formatting, moving some types to their own files.