Refactoring code that queries loggly, and code that inserts and updates MongoDB documents.