Added error checking for config map that is passed to constructor. Cleaned up comments