initial merge with James. Still problems but overall ok