Add documentation and minor code-refactoring

Why do we need to create a cancel button? If the answer is "because that's how it is" then we don't need to explain ourselves, and if not, then this explanation is insufficient.