Minor bug fixes and scoped api to /api.