Add .h files

Split out the function prototypes, global variables, and configuration
data to their own files, as should have been done long ago. This is
actually starting to look like a decent project!