Refactored functions and removed unneeded functions. Added button to select text on browsers which don't support the copy feature.