Various final fixes