Changed clipboard functions to Daniel Moore's implementation (https://gist.github.com/danielmoore/2322634)