Updating with changes from Discourse fork

Fixes #1.