Reorganized some code; added some documentation; added some (not yet
functional) color support.