This appears to work...
More fixes and other stuff....