Clean up tests, comments; add close() method.
Add ColorFormat enum; further work on metadata.