Refactor HTTP entry points

Closes #2.