bug fixes; beginnings of an autoplot script