Some fixes and integration