Added swipe to dismiss feature; code cleaning.