Added handler for the "commit button".
Improved code according to @zaggino suggestions.
Merge pull request #150 from FezVrasta/master

Added handler for the "commit button" by @FezVrasta