Fixed the order of matplotlib imports to make sure the rc params are all set before pylab is imported. Fixed a bug in the API. Cleanup