reorganization and clean up, working again now