Encapsulate general code in commit and show