Split comment endpoints into separate class

The other half of #273.