Support more restful endpoints

* Create an application class to hold a static context
* Remove an unnecessary callback