Bring over changes from second attempt