Some final fixes and changes