Rebasing on Merp's branch