Refactored helper methods
Added cancel button functionality
Fixed bug #56