Refactored to use Config class

Cleaned up.  Added palette support.