Minor refactoring

Move auxiliary types into their own file.

Replace all magic "." strings with the proper constants.