major cleanup, nearly ready for release