Add remainder of commit 6e549d9