Lock gems
Handle HTML comments correctly

Closes #32