A simple reusable command pattern implementation