Three essays on social insurance