final fixes and integration