Moved global scope data into its own module.

This commit fixes #48.