final fixes and clean