Refactored duplicated code into function.
Refactored issue handling out into function.
Be explicit about when to allow empty commits. Closes #31.