Essays on cooperation, migration and trust