Three essays in immigration economics