Minor cleanups

Fix init script so restart works
Return an error for api calls, not html
Clean up dependencies for the puppet class