Restructure: Add db commits where needed.