Add commit function. Fixes #13
Support for Symphony 2.5+