Clean up compact as json for routes