Several changes in code, the most significant is that it works.