Feel free to improve, this patchset is already merged.