Some more work and debug