Add some logging to REST; clean-up some formatting