Final modifications and fixes