diff --git a/.gitignore b/.gitignore
index 6832cd6..bb93d68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-serve.js
+node_modules
+bower_components
\ No newline at end of file
diff --git a/License.txt b/LICENSE
similarity index 92%
rename from License.txt
rename to LICENSE
index c5f4f6b..06cfb74 100644
--- a/License.txt
+++ b/LICENSE
@@ -1,4 +1,6 @@
-Copyright © 2011 by Neil Jenkins
+The MIT License (MIT)
+
+Copyright © 2011–2014 by Neil Jenkins
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to
@@ -16,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
\ No newline at end of file
+IN THE SOFTWARE.
diff --git a/Makefile b/Makefile
index bde562a..4812d5d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,20 @@
 .PHONY: all build clean
 
-all: build ui
+all: install build build-ui
 
+install:
+	npm install
 clean:
 	rm -rf build
 
-ui: build/Squire-UI.html build/Squire-UI.css build/Squire-UI.js fonts jQuery bootstrap
 
-build: build/ie8.js build/squire.js build/document.html 
+build-ui: build/Squire-UI.html build/Squire-UI.css build/Squire-UI.js build/assets
 
-fonts:
+build: build/squire.js build/squire-raw.js build/document.html 
+
+build/assets:
 	cp -r source/assets/font-awesome build
-
-jQuery:
 	cp -r source/assets/jQuery build
-
-bootstrap:
 	cp -r source/assets/bootstrap build
 
 build/Squire-UI.html: source/Squire-UI.html
@@ -30,10 +29,6 @@ build/Squire-UI.js: source/Squire-UI.js source/assets/drop/drop.min.js
 	mkdir -p $(@D)
 	cat $^ >$@
 
-build/ie8.js: source/ie8types.js source/ie8dom.js source/ie8range.js
-	mkdir -p $(@D)
-	uglifyjs $^ -c -m -o $@
-
 build/squire-raw.js: source/intro.js source/Constants.js source/TreeWalker.js source/Node.js source/Range.js source/Editor.js source/outro.js
 	mkdir -p $(@D)
 	cat $^ >$@
diff --git a/Readme.md b/README.md
similarity index 97%
rename from Readme.md
rename to README.md
index ec0f8ed..22cb6c3 100644
--- a/Readme.md
+++ b/README.md
@@ -1,15 +1,13 @@
 Squire
 ======
 
-Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation, whilst being supremely lightweight and flexible. It is built for the present and the future, and as such does not support truly ancient browsers. It should work fine back to around Opera 10, Firefox 3.5, Safari 4, Chrome 9 and IE8.
+Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation, whilst being supremely lightweight and flexible. It is built for the present and the future, and as such does not support truly ancient browsers. It should work fine back to around Opera 12, Firefox 3.5, Safari 5, Chrome 9 and IE9.
 
 Unlike other HTML5 rich text editors, Squire was written as a component for writing documents (emails, essays, etc.), not doing wysiwyg websites. If you are looking for support for inserting form controls or flash components or the like, you'll need to look elsewhere. However for many purposes, Squire may be just what you need, providing the power without the bloat. The key features are:
 
 ### Lightweight ###
 
-* Only 10KB of JS after minification and gzip (33KB before gzip).
-* IE8 support does not add extra bloat to the core library; instead, a separate
-  3KB (7KB before gzip) file patches the browser to support the W3C APIs.
+* Only 11.5KB of JS after minification and gzip (35KB before gzip).
 * Does not include its own XHR wrapper, widget library or lightbox overlays.
 * No dependencies.
 * No UI for a toolbar is supplied, allowing you to integrate seamlessly with the
@@ -376,4 +374,4 @@ Returns self.
 
 Changes any at-least-partially selected blocks which are part of a list to no longer be part of a list.
 
-Returns self.
\ No newline at end of file
+Returns self.
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..2f23d4f
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,25 @@
+{
+  "name": "Squire",
+  "version": "0.0.1",
+  "homepage": "https://github.com/neilj/Squire",
+  "authors": [
+    "Neil Jenkins <neil@nmjenkins.com>"
+  ],
+  "description": "Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation, whilst being supremely lightweight and flexible.",
+  "main": "build/squire.js",
+  "keywords": [
+    "wysiwyg",
+    "editor",
+    "text",
+    "html",
+    "squire"
+  ],
+  "license": "MIT",
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "test",
+    "tests"
+  ]
+}
diff --git a/build/Squire-UI.css b/build/Squire-UI.css
index f9518a7..31b10ac 100644
--- a/build/Squire-UI.css
+++ b/build/Squire-UI.css
@@ -36,7 +36,7 @@ body {
 }
 
 iframe {
-    width: 100%; 
+    width: 100%;
     border: 1px #919191 solid;
     border-radius: 4px;
     -webkit-border-radius: 4px;
@@ -50,13 +50,14 @@ iframe {
     outline: none;
     box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
 }
-  
+
 .menu .item {
     color:#000;
     float:left;
     background:#FFF;
     padding:10px;
     border-left:1px #EEE solid;
+    border-bottom: 3px transparent solid;
     -webkit-font-smoothing:subpixel-antialiased
 }
 
@@ -109,7 +110,7 @@ input[type=text] {
 }
 
 .menu .group .item:hover, .menu .item:first-child:hover {
-	border-left: 3px #55ACEE solid;
+	border-bottom: 3px #55ACEE solid;
 }
 
 .menu .item:first-child {
@@ -144,8 +145,7 @@ input[type=text] {
     right:0;
     margin-bottom: 5px;
 }
-
-  .drop-element, .drop-element:after, .drop-element:before, .drop-element *, .drop-element *:after, .drop-element *:before {
+.drop-element, .drop-element:after, .drop-element:before, .drop-element *, .drop-element *:after, .drop-element *:before {
   -webkit-box-sizing: border-box;
   -moz-box-sizing: border-box;
   box-sizing: border-box; }
@@ -268,4 +268,22 @@ input[type=text] {
 /*!
  *  Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
  *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
- */@font-face{font-family:'FontAwesome';src:url('./font-awesome/fontawesome-webfont.eot?v=4.1.0');src:url('./font-awesome/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('./font-awesome/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('./font-awesome/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('./font-awesome/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}
\ No newline at end of file
+ */@font-face{font-family:'FontAwesome';src:url('./font-awesome/fontawesome-webfont.eot?v=4.1.0');src:url('./font-awesome/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('./font-awesome/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('./font-awesome/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('./font-awesome/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}
+ .fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
+ .fa-bold:before{content:"\f032"}
+ .fa-italic:before{content:"\f033"}
+ .fa-underline:before{content:"\f0cd"}
+ .fa-font:before{content:"\f031"}
+ .fa-link:before{content:"\f0c1"}
+ .fa-list-alt:before{content:"\f022"}
+ .fa-list:before{content:"\f03a"}
+ .fa-picture-o:before{content:"\f03e"}
+ .fa-quote-right:before{content:"\f10e"}
+ .fa-chevron-up:before{content:"\f077"}
+ .fa-header:before{content:"\f1dc"}
+.fa-align-left:before{content:"\f036"}
+.fa-align-center:before{content:"\f037"}
+.fa-align-right:before{content:"\f038"}
+.fa-align-justify:before{content:"\f039"}
+.fa-undo:before{content:"\f0e2"}
+.fa-heart:before{content:"\f004"}
\ No newline at end of file
diff --git a/build/Squire-UI.js b/build/Squire-UI.js
index 2b7b7bd..f922d07 100644
--- a/build/Squire-UI.js
+++ b/build/Squire-UI.js
@@ -61,7 +61,7 @@ $(document).ready(function() {
         $('.quit').unbind().click(function () {
           $(this).parent().parent().removeClass('drop-open');
         });
-        
+
         $('.sumbitImageURL').unbind().click(function () {
           console.log("Passed through .sumbitImageURL");
           var editor = iframe.contentWindow.editor;
@@ -90,7 +90,7 @@ $(document).ready(function() {
           var selectedFonts = $('select#fontSelect option:selected').last().data('fonts');
           var fontSize =  $('select#textSelector option:selected').last().data('size') + 'px';
           editor.setFontSize(fontSize);
-          
+
           try {
             editor.setFontFace(selectedFonts);
           } catch (e) {
@@ -98,17 +98,17 @@ $(document).ready(function() {
           } finally {
             $(this).parent().parent().removeClass('drop-open');
           }
-          
+
         });
 
-        
+
       });
 
       $('.item').click(function() {
         var iframe = $(this).parents('.Squire-UI').next('iframe').first()[0];
         var editor = iframe.contentWindow.editor;
         var action = $(this).data('action');
-        
+
         test = {
           value: $(this).data('action'),
           testBold: editor.testPresenceinSelection('bold',
@@ -143,18 +143,18 @@ $(document).ready(function() {
         } else if (test.isNotValue('makeLink') | test.isNotValue('insertImage') | test.isNotValue('selectFont')) {
           // do nothing these are dropdowns.
         } else {
-          if (editor.getSelectedText() === '' && !(action == 'insertImage' || action == 'makeOrderedList' || action == 'increaseQuoteLevel' || action == 'redo' || action == 'undo')) return;
             editor[action]();
+            editor.focus();
         }
       });
     });
-    
+
     $(container).append(div);
     $(container).append(iframe);
 
     var style = document.createElement('style');
     style.innerHTML = 'blockquote { border-left: 3px green solid; padding-left: 5px; }';
-    
+
 
     iframe.contentWindow.editor = new Squire(iframe.contentWindow.document);
     iframe.addEventListener('load', function() {
@@ -164,5 +164,6 @@ $(document).ready(function() {
     iframe.contentWindow.document.head.appendChild(style);
     return iframe.contentWindow.editor;
   };
-});/*! drop 0.5.4 */
+});
+/*! drop 0.5.4 */
 !function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(){return function(){var t,e,o,i,n,s,r,l,h,a,p,f,u,d,c,g,m,b={}.hasOwnProperty,v=[].indexOf||function(t){for(var e=0,o=this.length;o>e;e++)if(e in this&&this[e]===t)return e;return-1},y=[].slice;null==this.Tether&&(this.Tether={modules:[]}),p=function(t){var e,o,i,n,s;if(o=getComputedStyle(t).position,"fixed"===o)return t;for(i=void 0,e=t;e=e.parentNode;){try{n=getComputedStyle(e)}catch(r){}if(null==n)return e;if(/(auto|scroll)/.test(n.overflow+n["overflow-y"]+n["overflow-x"])&&("absolute"!==o||"relative"===(s=n.position)||"absolute"===s||"fixed"===s))return e}return document.body},c=function(){var t;return t=0,function(){return t++}}(),m={},h=function(t){var e,i,s,r,l;if(s=t._tetherZeroElement,null==s&&(s=t.createElement("div"),s.setAttribute("data-tether-id",c()),n(s.style,{top:0,left:0,position:"absolute"}),t.body.appendChild(s),t._tetherZeroElement=s),e=s.getAttribute("data-tether-id"),null==m[e]){m[e]={},l=s.getBoundingClientRect();for(i in l)r=l[i],m[e][i]=r;o(function(){return m[e]=void 0})}return m[e]},u=null,r=function(t){var e,o,i,n,s,r,l;t===document?(o=document,t=document.documentElement):o=t.ownerDocument,i=o.documentElement,e={},l=t.getBoundingClientRect();for(n in l)r=l[n],e[n]=r;return s=h(o),e.top-=s.top,e.left-=s.left,null==e.width&&(e.width=document.body.scrollWidth-e.left-e.right),null==e.height&&(e.height=document.body.scrollHeight-e.top-e.bottom),e.top=e.top-i.clientTop,e.left=e.left-i.clientLeft,e.right=o.body.clientWidth-e.width-e.left,e.bottom=o.body.clientHeight-e.height-e.top,e},l=function(t){return t.offsetParent||document.documentElement},a=function(){var t,e,o,i,s;return t=document.createElement("div"),t.style.width="100%",t.style.height="200px",e=document.createElement("div"),n(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e),i=t.offsetWidth,e.style.overflow="scroll",s=t.offsetWidth,i===s&&(s=e.clientWidth),document.body.removeChild(e),o=i-s,{width:o,height:o}},n=function(t){var e,o,i,n,s,r,l;for(null==t&&(t={}),e=[],Array.prototype.push.apply(e,arguments),l=e.slice(1),s=0,r=l.length;r>s;s++)if(i=l[s])for(o in i)b.call(i,o)&&(n=i[o],t[o]=n);return t},d=function(t,e){var o,i,n,s,r;if(null!=t.classList){for(s=e.split(" "),r=[],i=0,n=s.length;n>i;i++)o=s[i],o.trim()&&r.push(t.classList.remove(o));return r}return t.className=t.className.replace(new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi")," ")},e=function(t,e){var o,i,n,s,r;if(null!=t.classList){for(s=e.split(" "),r=[],i=0,n=s.length;n>i;i++)o=s[i],o.trim()&&r.push(t.classList.add(o));return r}return d(t,e),t.className+=" "+e},f=function(t,e){return null!=t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)},g=function(t,o,i){var n,s,r,l,h,a;for(s=0,l=i.length;l>s;s++)n=i[s],v.call(o,n)<0&&f(t,n)&&d(t,n);for(a=[],r=0,h=o.length;h>r;r++)n=o[r],a.push(f(t,n)?void 0:e(t,n));return a},i=[],o=function(t){return i.push(t)},s=function(){var t,e;for(e=[];t=i.pop();)e.push(t());return e},t=function(){function t(){}return t.prototype.on=function(t,e,o,i){var n;return null==i&&(i=!1),null==this.bindings&&(this.bindings={}),null==(n=this.bindings)[t]&&(n[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:i})},t.prototype.once=function(t,e,o){return this.on(t,e,o,!0)},t.prototype.off=function(t,e){var o,i,n;if(null!=(null!=(i=this.bindings)?i[t]:void 0)){if(null==e)return delete this.bindings[t];for(o=0,n=[];o<this.bindings[t].length;)n.push(this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):o++);return n}},t.prototype.trigger=function(){var t,e,o,i,n,s,r,l,h;if(o=arguments[0],t=2<=arguments.length?y.call(arguments,1):[],null!=(r=this.bindings)?r[o]:void 0){for(n=0,h=[];n<this.bindings[o].length;)l=this.bindings[o][n],i=l.handler,e=l.ctx,s=l.once,i.apply(null!=e?e:this,t),h.push(s?this.bindings[o].splice(n,1):n++);return h}},t}(),this.Tether.Utils={getScrollParent:p,getBounds:r,getOffsetParent:l,extend:n,addClass:e,removeClass:d,hasClass:f,updateClasses:g,defer:o,flush:s,uniqueId:c,Evented:t,getScrollBarSize:a}}.call(this),function(){var t,e,o,i,n,s,r,l,h,a,p,f,u,d,c,g,m,b,v,y,w,C,O,x,T,E,P,_,W,S=[].slice,A=function(t,e){return function(){return t.apply(e,arguments)}};if(null==this.Tether)throw new Error("You must include the utils.js file before tether.js");i=this.Tether,W=i.Utils,g=W.getScrollParent,m=W.getSize,d=W.getOuterSize,f=W.getBounds,u=W.getOffsetParent,a=W.extend,n=W.addClass,O=W.removeClass,E=W.updateClasses,h=W.defer,p=W.flush,c=W.getScrollBarSize,P=function(t,e,o){return null==o&&(o=1),t+o>=e&&e>=t-o},T=function(){var t,e,o,i,n;for(t=document.createElement("div"),n=["transform","webkitTransform","OTransform","MozTransform","msTransform"],o=0,i=n.length;i>o;o++)if(e=n[o],void 0!==t.style[e])return e}(),x=[],C=function(){var t,e,o;for(e=0,o=x.length;o>e;e++)t=x[e],t.position(!1);return p()},b=function(){var t;return null!=(t="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?t:+new Date},function(){var t,e,o,i,n,s,r,l,h;for(e=null,o=null,i=null,n=function(){if(null!=o&&o>16)return o=Math.min(o-16,250),void(i=setTimeout(n,250));if(!(null!=e&&b()-e<10))return null!=i&&(clearTimeout(i),i=null),e=b(),C(),o=b()-e},l=["resize","scroll","touchmove"],h=[],s=0,r=l.length;r>s;s++)t=l[s],h.push(window.addEventListener(t,n));return h}(),t={center:"center",left:"right",right:"left"},e={middle:"middle",top:"bottom",bottom:"top"},o={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},l=function(o,i){var n,s;return n=o.left,s=o.top,"auto"===n&&(n=t[i.left]),"auto"===s&&(s=e[i.top]),{left:n,top:s}},r=function(t){var e,i;return{left:null!=(e=o[t.left])?e:t.left,top:null!=(i=o[t.top])?i:t.top}},s=function(){var t,e,o,i,n,s,r;for(e=1<=arguments.length?S.call(arguments,0):[],o={top:0,left:0},n=0,s=e.length;s>n;n++)r=e[n],i=r.top,t=r.left,"string"==typeof i&&(i=parseFloat(i,10)),"string"==typeof t&&(t=parseFloat(t,10)),o.top+=i,o.left+=t;return o},v=function(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t},y=w=function(t){var e,o,i;return i=t.split(" "),o=i[0],e=i[1],{top:o,left:e}},_=function(){function t(t){this.position=A(this.position,this);var e,o,n,s,r;for(x.push(this),this.history=[],this.setOptions(t,!1),s=i.modules,o=0,n=s.length;n>o;o++)e=s[o],null!=(r=e.initialize)&&r.call(this);this.position()}return t.modules=[],t.prototype.getClass=function(t){var e,o;return(null!=(e=this.options.classes)?e[t]:void 0)?this.options.classes[t]:(null!=(o=this.options.classes)?o[t]:void 0)!==!1?this.options.classPrefix?""+this.options.classPrefix+"-"+t:t:""},t.prototype.setOptions=function(t,e){var o,i,s,r,l,h;for(this.options=t,null==e&&(e=!0),o={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},this.options=a(o,this.options),l=this.options,this.element=l.element,this.target=l.target,this.targetModifier=l.targetModifier,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),h=["element","target"],s=0,r=h.length;r>s;s++){if(i=h[s],null==this[i])throw new Error("Tether Error: Both element and target must be defined");null!=this[i].jquery?this[i]=this[i][0]:"string"==typeof this[i]&&(this[i]=document.querySelector(this[i]))}if(n(this.element,this.getClass("element")),n(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");return this.targetAttachment=y(this.options.targetAttachment),this.attachment=y(this.options.attachment),this.offset=w(this.options.offset),this.targetOffset=w(this.options.targetOffset),null!=this.scrollParent&&this.disable(),this.scrollParent="scroll-handle"===this.targetModifier?this.target:g(this.target),this.options.enabled!==!1?this.enable(e):void 0},t.prototype.getTargetBounds=function(){var t,e,o,i,n,s,r,l,h;if(null==this.targetModifier)return f(this.target);switch(this.targetModifier){case"visible":return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:(t=f(this.target),n={height:t.height,width:t.width,top:t.top,left:t.left},n.height=Math.min(n.height,t.height-(pageYOffset-t.top)),n.height=Math.min(n.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),n.height=Math.min(innerHeight,n.height),n.height-=2,n.width=Math.min(n.width,t.width-(pageXOffset-t.left)),n.width=Math.min(n.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),n.width=Math.min(innerWidth,n.width),n.width-=2,n.top<pageYOffset&&(n.top=pageYOffset),n.left<pageXOffset&&(n.left=pageXOffset),n);case"scroll-handle":return h=this.target,h===document.body?(h=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=f(h),l=getComputedStyle(h),o=h.scrollWidth>h.clientWidth||"scroll"===[l.overflow,l.overflowX]||this.target!==document.body,s=0,o&&(s=15),i=t.height-parseFloat(l.borderTopWidth)-parseFloat(l.borderBottomWidth)-s,n={width:15,height:.975*i*(i/h.scrollHeight),left:t.left+t.width-parseFloat(l.borderLeftWidth)-15},e=0,408>i&&this.target===document.body&&(e=-11e-5*Math.pow(i,2)-.00727*i+22.58),this.target!==document.body&&(n.height=Math.max(n.height,24)),r=this.target.scrollTop/(h.scrollHeight-i),n.top=r*(i-n.height-e)+t.top+parseFloat(l.borderTopWidth),this.target===document.body&&(n.height=Math.max(n.height,24)),n}},t.prototype.clearCache=function(){return this._cache={}},t.prototype.cache=function(t,e){return null==this._cache&&(this._cache={}),null==this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]},t.prototype.enable=function(t){return null==t&&(t=!0),n(this.target,this.getClass("enabled")),n(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t?this.position():void 0},t.prototype.disable=function(){return O(this.target,this.getClass("enabled")),O(this.element,this.getClass("enabled")),this.enabled=!1,null!=this.scrollParent?this.scrollParent.removeEventListener("scroll",this.position):void 0},t.prototype.destroy=function(){var t,e,o,i,n;for(this.disable(),n=[],t=o=0,i=x.length;i>o;t=++o){if(e=x[t],e===this){x.splice(t,1);break}n.push(void 0)}return n},t.prototype.updateAttachClasses=function(t,e){var o,i,n,s,r,l,a,p,f,u=this;for(null==t&&(t=this.attachment),null==e&&(e=this.targetAttachment),s=["left","top","bottom","right","middle","center"],(null!=(f=this._addAttachClasses)?f.length:void 0)&&this._addAttachClasses.splice(0,this._addAttachClasses.length),o=null!=this._addAttachClasses?this._addAttachClasses:this._addAttachClasses=[],t.top&&o.push(""+this.getClass("element-attached")+"-"+t.top),t.left&&o.push(""+this.getClass("element-attached")+"-"+t.left),e.top&&o.push(""+this.getClass("target-attached")+"-"+e.top),e.left&&o.push(""+this.getClass("target-attached")+"-"+e.left),i=[],r=0,a=s.length;a>r;r++)n=s[r],i.push(""+this.getClass("element-attached")+"-"+n);for(l=0,p=s.length;p>l;l++)n=s[l],i.push(""+this.getClass("target-attached")+"-"+n);return h(function(){return null!=u._addAttachClasses?(E(u.element,u._addAttachClasses,i),E(u.target,u._addAttachClasses,i),u._addAttachClasses=void 0):void 0})},t.prototype.position=function(t){var e,o,n,h,a,d,g,m,b,y,w,C,O,x,T,E,P,_,W,S,A,M,B,L,z,F,H,Y,N,X,j,k,D,U,R,q=this;if(null==t&&(t=!0),this.enabled){for(this.clearCache(),S=l(this.targetAttachment,this.attachment),this.updateAttachClasses(this.attachment,S),e=this.cache("element-bounds",function(){return f(q.element)}),z=e.width,n=e.height,0===z&&0===n&&null!=this.lastSize?(X=this.lastSize,z=X.width,n=X.height):this.lastSize={width:z,height:n},B=M=this.cache("target-bounds",function(){return q.getTargetBounds()}),b=v(r(this.attachment),{width:z,height:n}),A=v(r(S),B),a=v(this.offset,{width:z,height:n}),d=v(this.targetOffset,B),b=s(b,a),A=s(A,d),h=M.left+A.left-b.left,L=M.top+A.top-b.top,j=i.modules,F=0,Y=j.length;Y>F;F++)if(g=j[F],T=g.position.call(this,{left:h,top:L,targetAttachment:S,targetPos:M,attachment:this.attachment,elementPos:e,offset:b,targetOffset:A,manualOffset:a,manualTargetOffset:d,scrollbarSize:_}),null!=T&&"object"==typeof T){if(T===!1)return!1;L=T.top,h=T.left}if(m={page:{top:L,left:h},viewport:{top:L-pageYOffset,bottom:pageYOffset-L-n+innerHeight,left:h-pageXOffset,right:pageXOffset-h-z+innerWidth}},document.body.scrollWidth>window.innerWidth&&(_=this.cache("scrollbar-size",c),m.viewport.bottom-=_.height),document.body.scrollHeight>window.innerHeight&&(_=this.cache("scrollbar-size",c),m.viewport.right-=_.width),(""!==(k=document.body.style.position)&&"static"!==k||""!==(D=document.body.parentElement.style.position)&&"static"!==D)&&(m.page.bottom=document.body.scrollHeight-L-n,m.page.right=document.body.scrollWidth-h-z),(null!=(U=this.options.optimizations)?U.moveElement:void 0)!==!1&&null==this.targetModifier){for(w=this.cache("target-offsetparent",function(){return u(q.target)}),x=this.cache("target-offsetparent-bounds",function(){return f(w)}),O=getComputedStyle(w),o=getComputedStyle(this.element),C=x,y={},R=["Top","Left","Bottom","Right"],H=0,N=R.length;N>H;H++)W=R[H],y[W.toLowerCase()]=parseFloat(O["border"+W+"Width"]);x.right=document.body.scrollWidth-x.left-C.width+y.right,x.bottom=document.body.scrollHeight-x.top-C.height+y.bottom,m.page.top>=x.top+y.top&&m.page.bottom>=x.bottom&&m.page.left>=x.left+y.left&&m.page.right>=x.right&&(P=w.scrollTop,E=w.scrollLeft,m.offset={top:m.page.top-x.top+P-y.top,left:m.page.left-x.left+E-y.left})}return this.move(m),this.history.unshift(m),this.history.length>3&&this.history.pop(),t&&p(),!0}},t.prototype.move=function(t){var e,o,i,n,s,r,l,p,f,d,c,g,m,b,v,y,w,C=this;if(null!=this.element.parentNode){p={};for(d in t){p[d]={};for(n in t[d]){for(i=!1,y=this.history,b=0,v=y.length;v>b;b++)if(l=y[b],!P(null!=(w=l[d])?w[n]:void 0,t[d][n])){i=!0;break}i||(p[d][n]=!0)}}e={top:"",left:"",right:"",bottom:""},f=function(t,o){var i,n,s;return(null!=(s=C.options.optimizations)?s.gpu:void 0)===!1?(t.top?e.top=""+o.top+"px":e.bottom=""+o.bottom+"px",t.left?e.left=""+o.left+"px":e.right=""+o.right+"px"):(t.top?(e.top=0,n=o.top):(e.bottom=0,n=-o.bottom),t.left?(e.left=0,i=o.left):(e.right=0,i=-o.right),e[T]="translateX("+Math.round(i)+"px) translateY("+Math.round(n)+"px)","msTransform"!==T?e[T]+=" translateZ(0)":void 0)},s=!1,(p.page.top||p.page.bottom)&&(p.page.left||p.page.right)?(e.position="absolute",f(p.page,t.page)):(p.viewport.top||p.viewport.bottom)&&(p.viewport.left||p.viewport.right)?(e.position="fixed",f(p.viewport,t.viewport)):null!=p.offset&&p.offset.top&&p.offset.left?(e.position="absolute",r=this.cache("target-offsetparent",function(){return u(C.target)}),u(this.element)!==r&&h(function(){return C.element.parentNode.removeChild(C.element),r.appendChild(C.element)}),f(p.offset,t.offset),s=!0):(e.position="absolute",f({top:!0,left:!0},t.page)),s||"BODY"===this.element.parentNode.tagName||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element)),m={},g=!1;for(n in e)c=e[n],o=this.element.style[n],""===o||""===c||"top"!==n&&"left"!==n&&"bottom"!==n&&"right"!==n||(o=parseFloat(o),c=parseFloat(c)),o!==c&&(g=!0,m[n]=e[n]);return g?h(function(){return a(C.element.style,m)}):void 0}},t}(),i.position=C,this.Tether=a(_,i)}.call(this),function(){var t,e,o,i,n,s,r,l,h,a,p=[].indexOf||function(t){for(var e=0,o=this.length;o>e;e++)if(e in this&&this[e]===t)return e;return-1};a=this.Tether.Utils,r=a.getOuterSize,s=a.getBounds,l=a.getSize,i=a.extend,h=a.updateClasses,o=a.defer,e={left:"right",right:"left",top:"bottom",bottom:"top",middle:"middle"},t=["left","top","right","bottom"],n=function(e,o){var i,n,r,l,h,a,p;if("scrollParent"===o?o=e.scrollParent:"window"===o&&(o=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),o===document&&(o=o.documentElement),null!=o.nodeType)for(n=l=s(o),h=getComputedStyle(o),o=[n.left,n.top,l.width+n.left,l.height+n.top],i=a=0,p=t.length;p>a;i=++a)r=t[i],r=r[0].toUpperCase()+r.substr(1),"Top"===r||"Left"===r?o[i]+=parseFloat(h["border"+r+"Width"]):o[i]-=parseFloat(h["border"+r+"Width"]);return o},this.Tether.modules.push({position:function(e){var r,l,a,f,u,d,c,g,m,b,v,y,w,C,O,x,T,E,P,_,W,S,A,M,B,L,z,F,H,Y,N,X,j,k,D,U,R,q,Z,$,I,G,J,K,Q,V,te,ee=this;if(L=e.top,v=e.left,W=e.targetAttachment,!this.options.constraints)return!0;for(E=function(e){var o,i,n,s;for(ee.removeClass(e),s=[],i=0,n=t.length;n>i;i++)o=t[i],s.push(ee.removeClass(""+e+"-"+o));return s},$=this.cache("element-bounds",function(){return s(ee.element)}),b=$.height,z=$.width,0===z&&0===b&&null!=this.lastSize&&(I=this.lastSize,z=I.width,b=I.height),A=this.cache("target-bounds",function(){return ee.getTargetBounds()}),S=A.height,M=A.width,_={},m={},l=[this.getClass("pinned"),this.getClass("out-of-bounds")],G=this.options.constraints,F=0,X=G.length;X>F;F++)g=G[F],g.outOfBoundsClass&&l.push(g.outOfBoundsClass),g.pinnedClass&&l.push(g.pinnedClass);for(H=0,j=l.length;j>H;H++)for(c=l[H],J=["left","top","right","bottom"],Y=0,k=J.length;k>Y;Y++)P=J[Y],l.push(""+c+"-"+P);for(r=[],_=i({},W),m=i({},this.attachment),K=this.options.constraints,N=0,D=K.length;D>N;N++){if(g=K[N],B=g.to,a=g.attachment,O=g.pin,null==a&&(a=""),p.call(a," ")>=0?(Q=a.split(" "),d=Q[0],u=Q[1]):u=d=a,f=n(this,B),("target"===d||"both"===d)&&(L<f[1]&&"top"===_.top&&(L+=S,_.top="bottom"),L+b>f[3]&&"bottom"===_.top&&(L-=S,_.top="top")),"together"===d&&(L<f[1]&&"top"===_.top&&("bottom"===m.top?(L+=S,_.top="bottom",L+=b,m.top="top"):"top"===m.top&&(L+=S,_.top="bottom",L-=b,m.top="bottom")),L+b>f[3]&&"bottom"===_.top&&("top"===m.top?(L-=S,_.top="top",L-=b,m.top="bottom"):"bottom"===m.top&&(L-=S,_.top="top",L+=b,m.top="top")),"middle"===_.top&&(L+b>f[3]&&"top"===m.top?(L-=b,m.top="bottom"):L<f[1]&&"bottom"===m.top&&(L+=b,m.top="top"))),("target"===u||"both"===u)&&(v<f[0]&&"left"===_.left&&(v+=M,_.left="right"),v+z>f[2]&&"right"===_.left&&(v-=M,_.left="left")),"together"===u&&(v<f[0]&&"left"===_.left?"right"===m.left?(v+=M,_.left="right",v+=z,m.left="left"):"left"===m.left&&(v+=M,_.left="right",v-=z,m.left="right"):v+z>f[2]&&"right"===_.left?"left"===m.left?(v-=M,_.left="left",v-=z,m.left="right"):"right"===m.left&&(v-=M,_.left="left",v+=z,m.left="left"):"center"===_.left&&(v+z>f[2]&&"left"===m.left?(v-=z,m.left="right"):v<f[0]&&"right"===m.left&&(v+=z,m.left="left"))),("element"===d||"both"===d)&&(L<f[1]&&"bottom"===m.top&&(L+=b,m.top="top"),L+b>f[3]&&"top"===m.top&&(L-=b,m.top="bottom")),("element"===u||"both"===u)&&(v<f[0]&&"right"===m.left&&(v+=z,m.left="left"),v+z>f[2]&&"left"===m.left&&(v-=z,m.left="right")),"string"==typeof O?O=function(){var t,e,o,i;for(o=O.split(","),i=[],e=0,t=o.length;t>e;e++)C=o[e],i.push(C.trim());return i}():O===!0&&(O=["top","left","right","bottom"]),O||(O=[]),x=[],y=[],L<f[1]&&(p.call(O,"top")>=0?(L=f[1],x.push("top")):y.push("top")),L+b>f[3]&&(p.call(O,"bottom")>=0?(L=f[3]-b,x.push("bottom")):y.push("bottom")),v<f[0]&&(p.call(O,"left")>=0?(v=f[0],x.push("left")):y.push("left")),v+z>f[2]&&(p.call(O,"right")>=0?(v=f[2]-z,x.push("right")):y.push("right")),x.length)for(T=null!=(V=this.options.pinnedClass)?V:this.getClass("pinned"),r.push(T),q=0,U=x.length;U>q;q++)P=x[q],r.push(""+T+"-"+P);if(y.length)for(w=null!=(te=this.options.outOfBoundsClass)?te:this.getClass("out-of-bounds"),r.push(w),Z=0,R=y.length;R>Z;Z++)P=y[Z],r.push(""+w+"-"+P);(p.call(x,"left")>=0||p.call(x,"right")>=0)&&(m.left=_.left=!1),(p.call(x,"top")>=0||p.call(x,"bottom")>=0)&&(m.top=_.top=!1),(_.top!==W.top||_.left!==W.left||m.top!==this.attachment.top||m.left!==this.attachment.left)&&this.updateAttachClasses(m,_)}return o(function(){return h(ee.target,r,l),h(ee.element,r,l)}),{top:L,left:v}}})}.call(this),function(){var t,e,o,i;i=this.Tether.Utils,e=i.getBounds,o=i.updateClasses,t=i.defer,this.Tether.modules.push({position:function(i){var n,s,r,l,h,a,p,f,u,d,c,g,m,b,v,y,w,C,O,x,T,E,P,_,W,S=this;if(c=i.top,a=i.left,T=this.cache("element-bounds",function(){return e(S.element)}),h=T.height,g=T.width,d=this.getTargetBounds(),l=c+h,p=a+g,n=[],c<=d.bottom&&l>=d.top)for(E=["left","right"],m=0,w=E.length;w>m;m++)f=E[m],((P=d[f])===a||P===p)&&n.push(f);if(a<=d.right&&p>=d.left)for(_=["top","bottom"],b=0,C=_.length;C>b;b++)f=_[b],((W=d[f])===c||W===l)&&n.push(f);for(r=[],s=[],u=["left","top","right","bottom"],r.push(this.getClass("abutted")),v=0,O=u.length;O>v;v++)f=u[v],r.push(""+this.getClass("abutted")+"-"+f);for(n.length&&s.push(this.getClass("abutted")),y=0,x=n.length;x>y;y++)f=n[y],s.push(""+this.getClass("abutted")+"-"+f);return t(function(){return o(S.target,s,r),o(S.element,s,r)}),!0}})}.call(this),function(){this.Tether.modules.push({position:function(t){var e,o,i,n,s,r,l;return r=t.top,e=t.left,this.options.shift?(o=function(t){return"function"==typeof t?t.call(this,{top:r,left:e}):t},i=o(this.options.shift),"string"==typeof i?(i=i.split(" "),i[1]||(i[1]=i[0]),s=i[0],n=i[1],s=parseFloat(s,10),n=parseFloat(n,10)):(l=[i.top,i.left],s=l[0],n=l[1]),r+=s,e+=n,{top:r,left:e}):void 0}})}.call(this),this.Tether}),function(){var t,e,o,i,n,s,r,l,h,a,p,f,u,d,c,g,m,b,v={}.hasOwnProperty,y=function(t,e){function o(){this.constructor=t}for(var i in e)v.call(e,i)&&(t[i]=e[i]);return o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype,t},w=[].indexOf||function(t){for(var e=0,o=this.length;o>e;e++)if(e in this&&this[e]===t)return e;return-1};b=Tether.Utils,l=b.extend,o=b.addClass,p=b.removeClass,h=b.hasClass,t=b.Evented,c="ontouchstart"in document.documentElement,n=["click"],c&&n.push("touchstart"),m={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"},g="";for(a in m)r=m[a],d=document.createElement("p"),void 0!==d.style[a]&&(g=r);u=function(t){var e,o,i,n;return i=t.split(" "),e=i[0],o=i[1],("left"===e||"right"===e)&&(n=[o,e],e=n[0],o=n[1]),[e,o].join(" ")},e={left:"right",right:"left",top:"bottom",bottom:"top",middle:"middle",center:"center"},i={},f=function(t,e){var o,i;for(i=[];-1!==(o=t.indexOf(e));)i.push(t.splice(o,1));return i},s=function(r){var a,d,c,m;return null==r&&(r={}),c=function(){return function(t,e,o){o.prototype=t.prototype;var i=new o,n=t.apply(i,e);return Object(n)===n?n:i}(a,arguments,function(){})},l(c,{createContext:s,drops:[],defaults:{}}),d={classPrefix:"drop",defaults:{position:"bottom left",openOn:"click",constrainToScrollParent:!0,constrainToWindow:!0,classes:"",remove:!1,tetherOptions:{}}},l(c,d,r),l(c.defaults,d.defaults,r.defaults),null==i[m=c.classPrefix]&&(i[m]=[]),c.updateBodyClasses=function(){var t,e,n,s,r;for(t=!1,r=i[c.classPrefix],n=0,s=r.length;s>n;n++)if(e=r[n],e.isOpened()){t=!0;break}return t?o(document.body,""+c.classPrefix+"-open"):p(document.body,""+c.classPrefix+"-open")},a=function(t){function s(t){if(this.options=t,this.options=l({},c.defaults,this.options),this.target=this.options.target,null==this.target)throw new Error("Drop Error: You must provide a target.");this.options.classes&&o(this.target,this.options.classes),c.drops.push(this),i[c.classPrefix].push(this),this._boundEvents=[],this.setupElements(),this.setupEvents(),this.setupTether()}return y(s,t),s.prototype._on=function(t,e,o){return this._boundEvents.push({element:t,event:e,handler:o}),t.addEventListener(e,o)},s.prototype.setupElements=function(){return this.drop=document.createElement("div"),o(this.drop,c.classPrefix),this.options.classes&&o(this.drop,this.options.classes),this.content=document.createElement("div"),o(this.content,""+c.classPrefix+"-content"),"object"==typeof this.options.content?this.content.appendChild(this.options.content):this.content.innerHTML=this.options.content,this.drop.appendChild(this.content)},s.prototype.setupTether=function(){var t,o;return o=this.options.position.split(" "),o[0]=e[o[0]],o=o.join(" "),t=[],t.push(this.options.constrainToScrollParent?{to:"scrollParent",pin:"top, bottom",attachment:"together none"}:{to:"scrollParent"}),t.push(this.options.constrainToWindow!==!1?{to:"window",attachment:"together"}:{to:"window"}),r={element:this.drop,target:this.target,attachment:u(o),targetAttachment:u(this.options.position),classPrefix:c.classPrefix,offset:"0 0",targetOffset:"0 0",enabled:!1,constraints:t},this.options.tetherOptions!==!1?this.tether=new Tether(l({},r,this.options.tetherOptions)):void 0},s.prototype.setupEvents=function(){var t,e,o,i,s,r,l,h,a,p,f=this;if(this.options.openOn){if("always"===this.options.openOn)return void setTimeout(this.open.bind(this));if(o=this.options.openOn.split(" "),w.call(o,"click")>=0)for(s=function(t){return f.toggle(),t.preventDefault()},e=function(t){return!f.isOpened()||t.target===f.drop||f.drop.contains(t.target)||t.target===f.target||f.target.contains(t.target)?void 0:f.close()},a=0,p=n.length;p>a;a++)t=n[a],this._on(this.target,t,s),this._on(document,t,e);return w.call(o,"hover")>=0?(i=!1,h=function(){return i=!0,f.open()},l=null,r=function(){return i=!1,null!=l&&clearTimeout(l),l=setTimeout(function(){return i||f.close(),l=null},50)},this._on(this.target,"mouseover",h),this._on(this.drop,"mouseover",h),this._on(this.target,"mouseout",r),this._on(this.drop,"mouseout",r)):void 0}},s.prototype.isOpened=function(){return h(this.drop,""+c.classPrefix+"-open")},s.prototype.toggle=function(){return this.isOpened()?this.close():this.open()},s.prototype.open=function(){var t,e,i=this;if(!this.isOpened())return this.drop.parentNode||document.body.appendChild(this.drop),null!=(t=this.tether)&&t.enable(),o(this.drop,""+c.classPrefix+"-open"),o(this.drop,""+c.classPrefix+"-open-transitionend"),setTimeout(function(){return o(i.drop,""+c.classPrefix+"-after-open")}),null!=(e=this.tether)&&e.position(),this.trigger("open"),c.updateBodyClasses()},s.prototype.close=function(){var t,e,o=this;if(this.isOpened())return p(this.drop,""+c.classPrefix+"-open"),p(this.drop,""+c.classPrefix+"-after-open"),this.drop.addEventListener(g,t=function(){return h(o.drop,""+c.classPrefix+"-open")||p(o.drop,""+c.classPrefix+"-open-transitionend"),o.drop.removeEventListener(g,t)}),this.trigger("close"),null!=(e=this.tether)&&e.disable(),c.updateBodyClasses(),this.options.remove?this.remove():void 0},s.prototype.remove=function(){var t;return this.close(),null!=(t=this.drop.parentNode)?t.removeChild(this.drop):void 0},s.prototype.position=function(){var t;return this.isOpened()&&null!=(t=this.tether)?t.position():void 0},s.prototype.destroy=function(){var t,e,o,n,s,r,l,h;for(this.remove(),null!=(r=this.tether)&&r.destroy(),l=this._boundEvents,n=0,s=l.length;s>n;n++)h=l[n],t=h.element,e=h.event,o=h.handler,t.removeEventListener(e,o);return this._boundEvents=[],this.tether=null,this.drop=null,this.content=null,this.target=null,f(i[c.classPrefix],this),f(c.drops,this)},s}(t),c},window.Drop=s(),document.addEventListener("DOMContentLoaded",function(){return Drop.updateBodyClasses()})}.call(this);
\ No newline at end of file
diff --git a/build/document.html b/build/document.html
index 428e909..cc73699 100644
--- a/build/document.html
+++ b/build/document.html
@@ -49,9 +49,6 @@
 </style>
 </head>
 <body>
-<!--[if IE 8]>
-<script type="text/javascript" src="ie8.js"></script>
-<![endif]-->
 <script type="text/javascript" src="squire.js"></script>
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/build/font-awesome/font-awesome.min.css b/build/font-awesome/font-awesome.min.css
index 82f960d..cf61c73 100755
--- a/build/font-awesome/font-awesome.min.css
+++ b/build/font-awesome/font-awesome.min.css
@@ -1,4 +1,22 @@
 /*!
  *  Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
  *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
- */@font-face{font-family:'FontAwesome';src:url('./font-awesome/fontawesome-webfont.eot?v=4.1.0');src:url('./font-awesome/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('./font-awesome/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('./font-awesome/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('./font-awesome/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}
\ No newline at end of file
+ */@font-face{font-family:'FontAwesome';src:url('./font-awesome/fontawesome-webfont.eot?v=4.1.0');src:url('./font-awesome/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('./font-awesome/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('./font-awesome/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('./font-awesome/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}
+ .fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
+ .fa-bold:before{content:"\f032"}
+ .fa-italic:before{content:"\f033"}
+ .fa-underline:before{content:"\f0cd"}
+ .fa-font:before{content:"\f031"}
+ .fa-link:before{content:"\f0c1"}
+ .fa-list-alt:before{content:"\f022"}
+ .fa-list:before{content:"\f03a"}
+ .fa-picture-o:before{content:"\f03e"}
+ .fa-quote-right:before{content:"\f10e"}
+ .fa-chevron-up:before{content:"\f077"}
+ .fa-header:before{content:"\f1dc"}
+.fa-align-left:before{content:"\f036"}
+.fa-align-center:before{content:"\f037"}
+.fa-align-right:before{content:"\f038"}
+.fa-align-justify:before{content:"\f039"}
+.fa-undo:before{content:"\f0e2"}
+.fa-heart:before{content:"\f004"}
\ No newline at end of file
diff --git a/build/ie8.js b/build/ie8.js
deleted file mode 100644
index 41efb73..0000000
--- a/build/ie8.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(){Array.prototype.indexOf=function(t,e){for(var n=this.length,r=0>e?Math.max(0,n+e):e||0;n>r;r+=1)if(this[r]===t)return r;return-1},Array.prototype.forEach=function(t,e){var n=this.length>>>0;if("function"!=typeof t)throw new TypeError;for(var r=0;n>r;r+=1)t.call(e,this[r],r,this)},Array.prototype.filter=function(t,e){for(var n=[],r=0,o=this.length;o>r;r+=1){var i=this[r];t.call(e,i,r,this)&&n.push(i)}return n},Object.keyOf=function(t,e){for(var n in t)if(t[n]===e)return n},Date.now=function(){return+new Date},String.prototype.trim=function(){for(var t=this.replace(/^\s\s*/,""),e=/\s/,n=t.length;e.test(t.charAt(n-=1)););return t.slice(0,n+1)}}(),function(){var t=document;window.ie=8,t.defaultView=window;var e={focus:"focusin",blur:"focusout"},n=function(){return!0},r=function(){return!1},o="altKey ctrlKey metaKey shiftKey clientX clientY charCode keyCode".split(" "),i=function(t){for(var n,r=t.type,i=document,a=t.srcElement||i,s=(a.ownerDocument||i).documentElement,c=o.length;c--;)n=o[c],this[n]=t[n];"propertychange"===r&&(r="INPUT"===a.nodeName&&"text"!==a.type&&"password"!==a.type?"change":"input"),this.type=Object.keyOf(e,r)||r,this.target=a,this.pageX=t.clientX+s.scrollLeft,this.pageY=t.clientY+s.scrollTop,t.button&&(this.button=4&t.button?1:2&t.button?2:0,this.which=this.button+1),this.relatedTarget=t.fromElement===a?t.toElement:t.fromElement,this._event=t};i.prototype={constructor:i,isEvent:!0,preventDefault:function(){this.isDefaultPrevented=n,this._event.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=n,this._event.cancelBubble=!0},isDefaultPrevented:r,isPropagationStopped:r},[t,Element.prototype].forEach(function(t){t.addEventListener=function(t,n){var r=n._ie_handleEvent||(n._ie_handleEvent=function(){var t=new i(window.event);"object"==typeof n?n.handleEvent(t):n.call(this,t)}),o=/paste|cut/.test(t)?this.body||this:this;n._ie_registeredCount=(n._ie_registeredCount||0)+1,o.attachEvent("on"+(e[t]||t),r)},t.addEventListener.isFake=!0,t.removeEventListener=function(t,n){var r=n._ie_handleEvent,o=/paste|cut/.test(t)?this.body||this:this;(n._ie_registeredCount-=1)||delete n._ie_handleEvent,r&&o.detachEvent("on"+(e[t]||t),r)},t.removeEventListener.isFake=!0}),t.defaultView.addEventListener=function(e,n,r){return t.addEventListener(e,n,r)},Object.defineProperty(Element.prototype,"textContent",{get:function(){return this.innerText},set:function(t){this.innerText=t}}),Element.prototype.compareDocumentPosition=function(t){1!==t.nodeType&&(t=t.parentNode);var e=this,n=e!==t,r=e.sourceIndex,o=t.sourceIndex;return(n&&e.contains(t)?16:0)+(n&&t.contains(e)?8:0)+(o>r?4:0)+(r>o?2:0)},HTMLDocument.prototype.normalize=function(){for(var t,e=this.childNodes,n=e.length;n--;)t=e[n],1===t.nodeType&&t.normalize()}}();var Range;!function(){var t=Array.prototype.indexOf,e=0,n=1,r=3,o=function(t,e){for(;e=e.parentNode;)if(t===e)return!0;return!1},i=function(t,e){var n,r,i,a,s;if(t===e||o(t,e))n=t;else if(o(e,t))n=e;else{for(r=[],i=[];t=t.parentNode;)r.push(t);for(;e=e.parentNode;)i.push(e);for(a=r.length,s=i.length;a--&&s--;)if(r[a]!==i[s]){n=r[a+1];break}n||(n=-1===a?r[0]:i[0])}return n};Range=function(t,e,n,r){t=t||document,e=e||0,this.startContainer=t,this.startOffset=e,this.endContainer=n||t,this.endOffset=void 0!==r?r:e,this._updateCollapsedAndAncestor()},Range.prototype={constructor:Range,_updateCollapsedAndAncestor:function(){this.collapsed=this.startContainer===this.endContainer&&this.startOffset===this.endOffset,this.commonAncestorContainer=i(this.startContainer,this.endContainer)},setStart:function(t,e){this.startContainer=t,this.startOffset=e,this._updateCollapsedAndAncestor()},setEnd:function(t,e){this.endContainer=t,this.endOffset=e,this._updateCollapsedAndAncestor()},setStartAfter:function(e){var n=e.parentNode;this.setStart(n,t.call(n.childNodes,e)+1)},setEndBefore:function(e){var n=e.parentNode;this.setEnd(n,t.call(n.childNodes,e))},selectNode:function(e){var n=e.parentNode,r=t.call(n.childNodes,e);this.setStart(n,r),this.setEnd(n,r+1)},selectNodeContents:function(t){this.setStart(t,0),this.setEnd(t,t.childNodes.length)},cloneRange:function(){return new Range(this.startContainer,this.startOffset,this.endContainer,this.endOffset)},collapse:function(t){t?this.setEnd(this.startContainer,this.startOffset):this.setStart(this.endContainer,this.endOffset)},compareBoundaryPoints:function(o,i){var a,s,c,d,f,u;if(o===e||o===r?(a=this.startContainer,s=this.startOffset):(a=this.endContainer,s=this.endOffset),o===e||o===n?(c=i.startContainer,d=i.startOffset):(c=i.endContainer,d=i.endOffset),a===c)return d>s?-1:s>d?1:0;for(f=a;u=f.parentNode;){if(u===c)return t.call(u.childNodes,f)<d?-1:1;f=u}for(f=c;u=f.parentNode;){if(u===a)return t.call(u.childNodes,f)<s?1:-1;f=u}return 1!==a.nodeType&&(a=a.parentNode),1!==c.nodeType&&(c=c.parentNode),a.sourceIndex<c.sourceIndex?-1:a.sourceIndex>c.sourceIndex?1:0}},document.createRange=function(){return new Range};var a=function(t,e){return t===e||o(t,e)},s=function(t){var e=t.nodeType;return 3===e||4===e||8===e},c=function(t,e){this.node=t,this.offset=e},d=function(t){var e,n,r,o,a=t.parentElement();return e=t.duplicate(),e.collapse(!0),n=e.parentElement(),e=t.duplicate(),e.collapse(!1),r=e.parentElement(),o=n===r?n:i(n,r),o===a?o:i(a,o)},f=function(e,n,r,o){var i=e.duplicate();i.collapse(r);var d=i.parentElement();if(a(n,d)||(d=n),!d.canHaveHTML)return new c(d.parentNode,t.call(d.parentNode.childNodes,d));var f,u,l,h,p,v=document.createElement("span"),m=r?"StartToStart":"StartToEnd";do d.insertBefore(v,v.previousSibling),i.moveToElementText(v),f=i.compareEndPoints(m,e);while(f>0&&v.previousSibling);if(p=v.nextSibling,-1===f&&p&&s(p)){i.setEndPoint(r?"EndToStart":"EndToEnd",e);var E;if(/[\r\n]/.test(p.data)||/[\r\n]/.test(i.text)){var g=i.duplicate(),y=g.text.replace(/\r\n/g,"\r").length;for(E=g.moveStart("character",y);-1===(f=g.compareEndPoints("StartToEnd",g));)E+=1,g.moveStart("character",1)}else E=i.text.length;h=new c(p,E)}else u=(o||!r)&&v.previousSibling,l=(o||r)&&v.nextSibling,h=l&&s(l)?new c(l,0):u&&s(u)?new c(u,u.data.length):new c(d,t.call(d.childNodes,v));return v.parentNode.removeChild(v),h},u=function(t,e){var n,r,o,i,a=t.offset,c=document,d=c.body.createTextRange(),f=s(t.node);return f?(n=t.node,r=n.parentNode):(i=t.node.childNodes,n=a<i.length?i[a]:null,r=t.node),o=c.createElement("span"),o.innerHTML="&#xfeff;",n?r.insertBefore(o,n):r.appendChild(o),d.moveToElementText(o),d.collapse(!e),r.removeChild(o),f&&d[e?"moveStart":"moveEnd"]("character",a),d},l=function(t){var e,n,r=d(t);return 0===t.compareEndPoints("StartToEnd",t)?e=n=f(t,r,!0,!0):(e=f(t,r,!0,!1),n=f(t,r,!1,!1)),new Range(e.node,e.offset,n.node,n.offset)},h=function(t){var e,n,r;return t.collapsed?e=u(new c(t.startContainer,t.startOffset),!0):(n=u(new c(t.startContainer,t.startOffset),!0),r=u(new c(t.endContainer,t.endOffset),!1),e=document.body.createTextRange(),e.setEndPoint("StartToStart",n),e.setEndPoint("EndToEnd",r)),e},p={rangeCount:0,getRangeAt:function(t){if(0!==t)return void 0;var e=document.selection.createRange();if(e.add){var n=document.createRange();n.moveToElementText(e.item(0)),n.collapse(!1),n.select(),e=n}return l(e)},removeAllRanges:function(){},addRange:function(t){h(t).select()}};document.attachEvent("onbeforeactivate",function(){p.rangeCount=1}),document.attachEvent("ondeactivate",function(){p.rangeCount=0}),window.getSelection=function(){return p}}();
\ No newline at end of file
diff --git a/build/squire-raw.js b/build/squire-raw.js
index 0e4690c..119187e 100644
--- a/build/squire-raw.js
+++ b/build/squire-raw.js
@@ -3,16 +3,13 @@
 ( function ( doc, undefined ) {
 
 "use strict";
-/*global doc, navigator */
-/*jshint strict:false */
+/*jshint strict:false, undef:false, unused:false */
 
 var DOCUMENT_POSITION_PRECEDING = 2; // Node.DOCUMENT_POSITION_PRECEDING
 var ELEMENT_NODE = 1;                // Node.ELEMENT_NODE;
 var TEXT_NODE = 3;                   // Node.TEXT_NODE;
 var SHOW_ELEMENT = 1;                // NodeFilter.SHOW_ELEMENT;
 var SHOW_TEXT = 4;                   // NodeFilter.SHOW_TEXT;
-var FILTER_ACCEPT = 1;               // NodeFilter.FILTER_ACCEPT;
-var FILTER_SKIP = 3;                 // NodeFilter.FILTER_SKIP;
 
 var START_TO_START = 0; // Range.START_TO_START
 var START_TO_END = 1;   // Range.START_TO_END
@@ -29,27 +26,26 @@ var isMac = /Mac OS X/.test( ua );
 var isGecko = /Gecko\//.test( ua );
 var isIE8or9or10 = /Trident\/[456]\./.test( ua );
 var isIE8 = ( win.ie === 8 );
-var isOpera = !!win.opera;
+var isPresto = !!win.opera;
 var isWebKit = /WebKit\//.test( ua );
 
 var ctrlKey = isMac ? 'meta-' : 'ctrl-';
 
-var useTextFixer = isIE8or9or10 || isOpera;
+var useTextFixer = isIE8or9or10 || isPresto;
 var cantFocusEmptyTextNodes = isIE8or9or10 || isWebKit;
 var losesSelectionOnBlur = isIE8or9or10;
-var hasBuggySplit = ( function () {
+var hasBuggySplit = function ( doc ) {
     var div = doc.createElement( 'DIV' ),
         text = doc.createTextNode( '12' );
     div.appendChild( text );
     text.splitText( 2 );
     return div.childNodes.length !== 2;
-}() );
+};
 
 // Use [^ \t\r\n] instead of \S so that nbsp does not count as white-space
 var notWS = /[^ \t\r\n]/;
 
 var indexOf = Array.prototype.indexOf;
-/*global FILTER_ACCEPT */
 /*jshint strict:false */
 
 /*
@@ -103,7 +99,7 @@ TreeWalker.prototype.nextNode = function () {
             return null;
         }
         if ( ( typeToBitArray[ node.nodeType ] & nodeType ) &&
-                filter( node ) === FILTER_ACCEPT ) {
+                filter( node ) ) {
             this.currentNode = node;
             return node;
         }
@@ -133,29 +129,14 @@ TreeWalker.prototype.previousNode = function () {
             return null;
         }
         if ( ( typeToBitArray[ node.nodeType ] & nodeType ) &&
-                filter( node ) === FILTER_ACCEPT ) {
+                filter( node ) ) {
             this.currentNode = node;
             return node;
         }
         current = node;
     }
 };
-/*global
-    ELEMENT_NODE,
-    TEXT_NODE,
-    SHOW_ELEMENT,
-    FILTER_ACCEPT,
-    FILTER_SKIP,
-    win,
-    isOpera,
-    useTextFixer,
-    cantFocusEmptyTextNodes,
-
-    TreeWalker,
-
-    Text
-*/
-/*jshint strict:false */
+/*jshint strict:false, undef:false, unused:false */
 
 var inlineNodeNames  = /^(?:#text|A(?:BBR|CRONYM)?|B(?:R|D[IO])?|C(?:ITE|ODE)|D(?:ATA|FN|EL)|EM|FONT|HR|I(?:NPUT|MG|NS)?|KBD|Q|R(?:P|T|UBY)|S(?:U[BP]|PAN|TR(?:IKE|ONG)|MALL|AMP)?|U|VAR|WBR)$/;
 
@@ -214,13 +195,10 @@ function isContainer ( node ) {
         !isInline( node ) && !isBlock( node );
 }
 
-function acceptIfBlock ( el ) {
-    return isBlock( el ) ? FILTER_ACCEPT : FILTER_SKIP;
-}
 function getBlockWalker ( node ) {
     var doc = node.ownerDocument,
         walker = new TreeWalker(
-            doc.body, SHOW_ELEMENT, acceptIfBlock, false );
+            doc.body, SHOW_ELEMENT, isBlock, false );
     walker.currentNode = node;
     return walker;
 }
@@ -290,6 +268,29 @@ function empty ( node ) {
     return frag;
 }
 
+function createElement ( doc, tag, props, children ) {
+    var el = doc.createElement( tag ),
+        attr, value, i, l;
+    if ( props instanceof Array ) {
+        children = props;
+        props = null;
+    }
+    if ( props ) {
+        for ( attr in props ) {
+            value = props[ attr ];
+            if ( value !== undefined ) {
+                el.setAttribute( attr, props[ attr ] );
+            }
+        }
+    }
+    if ( children ) {
+        for ( i = 0, l = children.length; i < l; i += 1 ) {
+            el.appendChild( children[i] );
+        }
+    }
+    return el;
+}
+
 function fixCursor ( node ) {
     // In Webkit and Gecko, block level elements are collapsed and
     // unfocussable if they have no content. To remedy this, a <BR> must be
@@ -297,7 +298,8 @@ function fixCursor ( node ) {
     // cursor to appear.
     var doc = node.ownerDocument,
         root = node,
-        fixer, child;
+        fixer, child,
+        l, instance;
 
     if ( node.nodeName === 'BODY' ) {
         if ( !( child = node.firstChild ) || child.nodeName === 'BR' ) {
@@ -314,11 +316,22 @@ function fixCursor ( node ) {
     }
 
     if ( isInline( node ) ) {
-        if ( !node.firstChild ) {
+        child = node.firstChild;
+        while ( cantFocusEmptyTextNodes && child &&
+                child.nodeType === TEXT_NODE && !child.data ) {
+            node.removeChild( child );
+            child = node.firstChild;
+        }
+        if ( !child ) {
             if ( cantFocusEmptyTextNodes ) {
                 fixer = doc.createTextNode( '\u200B' );
-                if ( win.editor ) {
-                    win.editor._didAddZWS();
+                // Find the relevant Squire instance and notify
+                l = instances.length;
+                while ( l-- ) {
+                    instance = instances[l];
+                    if ( instance._doc === doc ) {
+                        instance._didAddZWS();
+                    }
                 }
             } else {
                 fixer = doc.createTextNode( '' );
@@ -358,6 +371,42 @@ function fixCursor ( node ) {
     return root;
 }
 
+// Recursively examine container nodes and wrap any inline children.
+function fixContainer ( container ) {
+    var children = container.childNodes,
+        doc = container.ownerDocument,
+        wrapper = null,
+        i, l, child, isBR;
+    for ( i = 0, l = children.length; i < l; i += 1 ) {
+        child = children[i];
+        isBR = child.nodeName === 'BR';
+        if ( !isBR && isInline( child ) ) {
+            if ( !wrapper ) { wrapper = createElement( doc, 'DIV' ); }
+            wrapper.appendChild( child );
+            i -= 1;
+            l -= 1;
+        } else if ( isBR || wrapper ) {
+            if ( !wrapper ) { wrapper = createElement( doc, 'DIV' ); }
+            fixCursor( wrapper );
+            if ( isBR ) {
+                container.replaceChild( wrapper, child );
+            } else {
+                container.insertBefore( wrapper, child );
+                i += 1;
+                l += 1;
+            }
+            wrapper = null;
+        }
+        if ( isContainer( child ) ) {
+            fixContainer( child );
+        }
+    }
+    if ( wrapper ) {
+        container.appendChild( fixCursor( wrapper ) );
+    }
+    return container;
+}
+
 function split ( node, offset, stopNode ) {
     var nodeType = node.nodeType,
         parent, clone, next;
@@ -499,7 +548,7 @@ function mergeWithBlock ( block, next, range ) {
     // Steps to reproduce bug: Type "a-b-c" (where - is return)
     // then backspace twice. The cursor goes to the top instead
     // of after "b".
-    if ( isOpera && ( last = block.lastChild ) && last.nodeName === 'BR' ) {
+    if ( isPresto && ( last = block.lastChild ) && last.nodeName === 'BR' ) {
         block.removeChild( last );
     }
 }
@@ -541,90 +590,7 @@ function mergeContainers ( node ) {
         fixCursor( prev );
     }
 }
-
-// Recursively examine container nodes and wrap any inline children.
-function fixContainer ( container ) {
-    var children = container.childNodes,
-        doc = container.ownerDocument,
-        wrapper = null,
-        i, l, child, isBR;
-    for ( i = 0, l = children.length; i < l; i += 1 ) {
-        child = children[i];
-        isBR = child.nodeName === 'BR';
-        if ( !isBR && isInline( child ) ) {
-            if ( !wrapper ) { wrapper = createElement( doc, 'DIV' ); }
-            wrapper.appendChild( child );
-            i -= 1;
-            l -= 1;
-        } else if ( isBR || wrapper ) {
-            if ( !wrapper ) { wrapper = createElement( doc, 'DIV' ); }
-            fixCursor( wrapper );
-            if ( isBR ) {
-                container.replaceChild( wrapper, child );
-            } else {
-                container.insertBefore( wrapper, child );
-                i += 1;
-                l += 1;
-            }
-            wrapper = null;
-        }
-        if ( isContainer( child ) ) {
-            fixContainer( child );
-        }
-    }
-    if ( wrapper ) {
-        container.appendChild( fixCursor( wrapper ) );
-    }
-    return container;
-}
-
-function createElement ( doc, tag, props, children ) {
-    var el = doc.createElement( tag ),
-        attr, value, i, l;
-    if ( props instanceof Array ) {
-        children = props;
-        props = null;
-    }
-    if ( props ) {
-        for ( attr in props ) {
-            value = props[ attr ];
-            if ( value !== undefined ) {
-                el.setAttribute( attr, props[ attr ] );
-            }
-        }
-    }
-    if ( children ) {
-        for ( i = 0, l = children.length; i < l; i += 1 ) {
-            el.appendChild( children[i] );
-        }
-    }
-    return el;
-}
-/*global
-    ELEMENT_NODE,
-    TEXT_NODE,
-    SHOW_TEXT,
-    FILTER_ACCEPT,
-    START_TO_START,
-    START_TO_END,
-    END_TO_END,
-    END_TO_START,
-    indexOf,
-
-    TreeWalker,
-
-    isLeaf,
-    isInline,
-    isBlock,
-    getPreviousBlock,
-    getNextBlock,
-    getLength,
-    fixCursor,
-    split,
-    mergeWithBlock,
-    mergeContainers
-*/
-/*jshint strict:false */
+/*jshint strict:false, undef:false, unused:false */
 
 var getNodeBefore = function ( node, offset ) {
     var children = node.childNodes;
@@ -661,8 +627,8 @@ var forEachTextNodeInRange = function ( range, fn ) {
         endContainer = range.endContainer,
         root = range.commonAncestorContainer,
         walker = new TreeWalker(
-            root, SHOW_TEXT, function ( node ) {
-                return FILTER_ACCEPT;
+            root, SHOW_TEXT, function (/* node */) {
+                return true;
         }, false ),
         textnode = walker.currentNode = startContainer;
 
@@ -1053,50 +1019,56 @@ var getEndBlockOfRange = function ( range ) {
     return block && isNodeContainedInRange( range, block, true ) ? block : null;
 };
 
+var contentWalker = new TreeWalker( null,
+    SHOW_TEXT|SHOW_ELEMENT,
+    function ( node ) {
+        return node.nodeType === TEXT_NODE ?
+            notWS.test( node.data ) :
+            node.nodeName === 'IMG';
+    }
+);
+
 var rangeDoesStartAtBlockBoundary = function ( range ) {
     var startContainer = range.startContainer,
-        startOffset = range.startOffset,
-        parent, child;
+        startOffset = range.startOffset;
 
-    while ( isInline( startContainer ) ) {
+    // If in the middle or end of a text node, we're not at the boundary.
+    if ( startContainer.nodeType === TEXT_NODE ) {
         if ( startOffset ) {
             return false;
         }
-        parent = startContainer.parentNode;
-        startOffset = indexOf.call( parent.childNodes, startContainer );
-        startContainer = parent;
+        contentWalker.currentNode = startContainer;
+    } else {
+        contentWalker.currentNode = getNodeAfter( startContainer, startOffset );
     }
-    // Skip empty text nodes and <br>s.
-    while ( startOffset &&
-            ( child = startContainer.childNodes[ startOffset - 1 ] ) &&
-            ( child.data === '' || child.nodeName === 'BR' ) ) {
-        startOffset -= 1;
-    }
-    return !startOffset;
+
+    // Otherwise, look for any previous content in the same block.
+    contentWalker.root = getStartBlockOfRange( range );
+
+    return !contentWalker.previousNode();
 };
 
 var rangeDoesEndAtBlockBoundary = function ( range ) {
     var endContainer = range.endContainer,
         endOffset = range.endOffset,
-        length = getLength( endContainer ),
-        parent, child;
+        length;
 
-    while ( isInline( endContainer ) ) {
-        if ( endOffset !== length ) {
+    // If in a text node with content, and not at the end, we're not
+    // at the boundary
+    if ( endContainer.nodeType === TEXT_NODE ) {
+        length = endContainer.data.length;
+        if ( length && endOffset < length ) {
             return false;
         }
-        parent = endContainer.parentNode;
-        endOffset = indexOf.call( parent.childNodes, endContainer ) + 1;
-        endContainer = parent;
-        length = endContainer.childNodes.length;
+        contentWalker.currentNode = endContainer;
+    } else {
+        contentWalker.currentNode = getNodeBefore( endContainer, endOffset );
     }
-    // Skip empty text nodes and <br>s.
-    while ( endOffset < length &&
-            ( child = endContainer.childNodes[ endOffset ] ) &&
-            ( child.data === '' || child.nodeName === 'BR' ) ) {
-        endOffset += 1;
-    }
-    return endOffset === length;
+
+    // Otherwise, look for any further content in the same block.
+    contentWalker.root = getEndBlockOfRange( range );
+
+    return !contentWalker.nextNode();
 };
 
 var expandRangeToBlockBoundaries = function ( range ) {
@@ -1111,73 +1083,9 @@ var expandRangeToBlockBoundaries = function ( range ) {
         range.setEnd( parent, indexOf.call( parent.childNodes, end ) + 1 );
     }
 };
-/*global
-    DOCUMENT_POSITION_PRECEDING,
-    ELEMENT_NODE,
-    TEXT_NODE,
-    SHOW_ELEMENT,
-    SHOW_TEXT,
-    FILTER_ACCEPT,
-    FILTER_SKIP,
-    win,
-    isIOS,
-    isMac,
-    isGecko,
-    isIE8or9or10,
-    isIE8,
-    isOpera,
-    ctrlKey,
-    useTextFixer,
-    cantFocusEmptyTextNodes,
-    losesSelectionOnBlur,
-    hasBuggySplit,
-    notWS,
-    indexOf,
+/*jshint strict:false, undef:false, unused:false */
 
-    TreeWalker,
-
-    hasTagAttributes,
-    isLeaf,
-    isInline,
-    isBlock,
-    isContainer,
-    getBlockWalker,
-    getPreviousBlock,
-    getNextBlock,
-    getNearest,
-    getPath,
-    getLength,
-    detach,
-    replaceWith,
-    empty,
-    fixCursor,
-    split,
-    mergeInlines,
-    mergeWithBlock,
-    mergeContainers,
-    fixContainer,
-    createElement,
-
-    forEachTextNodeInRange,
-    getTextContentInRange,
-    insertNodeInRange,
-    extractContentsOfRange,
-    deleteContentsOfRange,
-    insertTreeFragmentIntoRange,
-    isNodeContainedInRange,
-    moveRangeBoundariesDownTree,
-    moveRangeBoundariesUpTree,
-    getStartBlockOfRange,
-    getEndBlockOfRange,
-    rangeDoesStartAtBlockBoundary,
-    rangeDoesEndAtBlockBoundary,
-    expandRangeToBlockBoundaries,
-
-    top,
-    console,
-    setTimeout
-*/
-/*jshint strict:false */
+var instances = [];
 
 function Squire ( doc ) {
     var win = doc.defaultView;
@@ -1227,7 +1135,7 @@ function Squire ( doc ) {
         this.addEventListener( 'keyup', this._ieSelAllClean );
     }
     // Opera does not fire keydown repeatedly.
-    this.addEventListener( isOpera ? 'keypress' : 'keydown', this._onKey );
+    this.addEventListener( isPresto ? 'keypress' : 'keydown', this._onKey );
 
     // Fix IE8/9's buggy implementation of Text#splitText.
     // If the split is at the end of the node, it doesn't insert the newly split
@@ -1235,7 +1143,7 @@ function Squire ( doc ) {
     // And even if the split is not at the end, the original node is removed
     // from the document and replaced by another, rather than just having its
     // data shortened.
-    if ( hasBuggySplit ) {
+    if ( hasBuggySplit( doc ) ) {
         win.Text.prototype.splitText = function ( offset ) {
             var afterSplit = this.ownerDocument.createTextNode(
                     this.data.slice( offset ) ),
@@ -1262,6 +1170,8 @@ function Squire ( doc ) {
         doc.execCommand( 'enableObjectResizing', false, 'false' );
         doc.execCommand( 'enableInlineTableEditing', false, 'false' );
     } catch ( error ) {}
+
+    instances.push( this );
 }
 
 var proto = Squire.prototype;
@@ -1323,6 +1233,26 @@ proto.fireEvent = function ( type, event ) {
     return this;
 };
 
+proto.destroy = function () {
+    var win = this._win,
+        doc = this._doc,
+        events = this._events,
+        type;
+    win.removeEventListener( 'focus', this, false );
+    win.removeEventListener( 'blur', this, false );
+    for ( type in events ) {
+        if ( !customEvents[ type ] ) {
+            doc.removeEventListener( type, this, true );
+        }
+    }
+    var l = instances.length;
+    while ( l-- ) {
+        if ( instances[l] === this ) {
+            instances.splice( l, 1 );
+        }
+    }
+};
+
 proto.handleEvent = function ( event ) {
     this.fireEvent( event.type, event );
 };
@@ -1339,7 +1269,7 @@ proto.addEventListener = function ( type, fn ) {
     if ( !handlers ) {
         handlers = this._events[ type ] = [];
         if ( !customEvents[ type ] ) {
-            this._doc.addEventListener( type, this, false );
+            this._doc.addEventListener( type, this, true );
         }
     }
     handlers.push( fn );
@@ -1453,7 +1383,7 @@ proto._removeZWS = function () {
         return;
     }
     var walker = new TreeWalker( this._body, SHOW_TEXT, function () {
-            return FILTER_ACCEPT;
+            return true;
         }, false ),
         node, index;
     while ( node = walker.nextNode() ) {
@@ -1493,11 +1423,10 @@ proto._updatePathOnEvent = function () {
 // --- Focus ---
 
 proto.focus = function () {
-    // FF seems to need the body to be focussed
-    // (at least on first load).
-    if ( isGecko ) {
-        this._body.focus();
-    }
+    // FF seems to need the body to be focussed (at least on first load).
+    // Chrome also now needs body to be focussed in order to show the cursor
+    // (otherwise it is focussed, but the cursor doesn't appear).
+    this._body.focus();
     this._win.focus();
     return this;
 };
@@ -1710,8 +1639,7 @@ proto.hasFormat = function ( tag, attributes, range ) {
     // Otherwise, check each text node at least partially contained within
     // the selection and make sure all of them have the format we want.
     walker = new TreeWalker( root, SHOW_TEXT, function ( node ) {
-        return isNodeContainedInRange( range, node, true ) ?
-            FILTER_ACCEPT : FILTER_SKIP;
+        return isNodeContainedInRange( range, node, true );
     }, false );
 
     var seenNode = false;
@@ -1729,7 +1657,7 @@ proto._addFormat = function ( tag, attributes, range ) {
     // If the range is collapsed we simply insert the node by wrapping
     // it round the range and focus it.
     var el, walker, startContainer, endContainer, startOffset, endOffset,
-        textnode, needsFormat;
+        textNode, needsFormat;
 
     if ( range.collapsed ) {
         el = fixCursor( this.createElement( tag, attributes ) );
@@ -1750,47 +1678,54 @@ proto._addFormat = function ( tag, attributes, range ) {
             range.commonAncestorContainer,
             SHOW_TEXT,
             function ( node ) {
-                return isNodeContainedInRange( range, node, true ) ?
-                    FILTER_ACCEPT : FILTER_SKIP;
+                return isNodeContainedInRange( range, node, true );
             },
             false
         );
 
         // Start at the beginning node of the range and iterate through
         // all the nodes in the range that need formatting.
-        startOffset = 0;
-        endOffset = 0;
-        textnode = walker.currentNode = range.startContainer;
+        startContainer = range.startContainer;
+        startOffset = range.startOffset;
+        endContainer = range.endContainer;
+        endOffset = range.endOffset;
 
-        if ( textnode.nodeType !== TEXT_NODE ) {
-            textnode = walker.nextNode();
+        // Make sure we start inside a text node.
+        walker.currentNode = startContainer;
+        if ( startContainer.nodeType !== TEXT_NODE ) {
+            startContainer = walker.nextNode();
+            startOffset = 0;
         }
 
         do {
-            needsFormat = !getNearest( textnode, tag, attributes );
-            if ( textnode === range.endContainer ) {
-                if ( needsFormat && textnode.length > range.endOffset ) {
-                    textnode.splitText( range.endOffset );
-                } else {
-                    endOffset = range.endOffset;
-                }
-            }
-            if ( textnode === range.startContainer ) {
-                if ( needsFormat && range.startOffset ) {
-                    textnode = textnode.splitText( range.startOffset );
-                } else {
-                    startOffset = range.startOffset;
-                }
-            }
+            textNode = walker.currentNode;
+            needsFormat = !getNearest( textNode, tag, attributes );
             if ( needsFormat ) {
+                if ( textNode === endContainer &&
+                        textNode.length > endOffset ) {
+                    textNode.splitText( endOffset );
+                }
+                if ( textNode === startContainer && startOffset ) {
+                    textNode = textNode.splitText( startOffset );
+                    if ( endContainer === startContainer ) {
+                        endContainer = textNode;
+                        endOffset -= startOffset;
+                    }
+                    startContainer = textNode;
+                    startOffset = 0;
+                }
                 el = this.createElement( tag, attributes );
-                replaceWith( textnode, el );
-                el.appendChild( textnode );
-                endOffset = textnode.length;
+                replaceWith( textNode, el );
+                el.appendChild( textNode );
             }
-            endContainer = textnode;
-            if ( !startContainer ) { startContainer = endContainer; }
-        } while ( textnode = walker.nextNode() );
+        } while ( walker.nextNode() );
+
+        // Make sure we finish inside a text node. Otherwise offset may have
+        // changed.
+        if ( endContainer.nodeType !== TEXT_NODE ) {
+            endContainer = textNode;
+            endOffset = textNode.length;
+        }
 
         // Now set the selection to as it was before
         range = this._createRange(
@@ -2210,7 +2145,7 @@ var addLinks = function ( frag ) {
     var doc = frag.ownerDocument,
         walker = new TreeWalker( frag, SHOW_TEXT,
                 function ( node ) {
-            return getNearest( node, 'A' ) ? FILTER_SKIP : FILTER_ACCEPT;
+            return !getNearest( node, 'A' );
         }, false ),
         node, data, parent, match, index, endIndex, child;
     while ( node = walker.nextNode() ) {
@@ -2482,6 +2417,14 @@ var cleanTree = function ( node, allowStyles ) {
                     }
                     continue;
                 }
+                // If we have just white space, it may still be important if it
+                // separates two inline nodes, e.g. "<a>link</a> <a>link</a>".
+                else if ( i && i + 1 < l &&
+                        isInline( children[ i - 1 ] ) &&
+                        isInline( children[ i + 1 ] ) ) {
+                    child.data = ' ';
+                    continue;
+                }
             }
             node.removeChild( child );
             i -= 1;
@@ -2492,10 +2435,9 @@ var cleanTree = function ( node, allowStyles ) {
 };
 
 var notWSTextNode = function ( node ) {
-    return ( node.nodeType === ELEMENT_NODE ?
+    return node.nodeType === ELEMENT_NODE ?
         node.nodeName === 'BR' :
-        notWS.test( node.data ) ) ?
-        FILTER_ACCEPT : FILTER_SKIP;
+        notWS.test( node.data );
 };
 var isLineBreak = function ( br ) {
     var block = br.parentNode,
@@ -2539,17 +2481,23 @@ var cleanupBRs = function ( root ) {
             block = block.parentNode;
         }
         // If this is not inside a block, replace it by wrapping
-        // inlines in DIV.
-        if ( !isBlock( block ) || !tagAfterSplit[ block.nodeName ] ) {
+        // inlines in a <div>.
+        if ( !isBlock( block ) ) {
             fixContainer( block );
         }
-        // If in a block we can split, split it instead, but only if there
-        // is actual text content in the block. Otherwise, the <br> is a
-        // placeholder to stop the block from collapsing, so we must leave
-        // it.
         else {
+            // If it doesn't break a line, just remove it; it's not doing
+            // anything useful. We'll add it back later if required by the
+            // browser. If it breaks a line, split the block or leave it as
+            // appropriate.
             if ( brBreaksLine[l] ) {
-                splitBlock( block, br.parentNode, br );
+                // If in a <div>, split, but anywhere else we might change
+                // the formatting too much (e.g. <li> -> to two list items!)
+                // so just play it safe and leave it.
+                if ( block.nodeName !== 'DIV' ) {
+                    continue;
+                }
+                split( br.parentNode, br, block.parentNode );
             }
             detach( br );
         }
@@ -2631,11 +2579,20 @@ proto._onPaste = function ( event ) {
         startContainer = range.startContainer,
         startOffset = range.startOffset,
         endContainer = range.endContainer,
-        endOffset = range.endOffset;
+        endOffset = range.endOffset,
+        startBlock = getStartBlockOfRange( range );
 
+    // Record undo checkpoint
+    self._recordUndoState( range );
+    self._getRangeAndRemoveBookmark( range );
+
+    // We need to position the pasteArea in the visible portion of the screen
+    // to stop the browser auto-scrolling.
     var pasteArea = this.createElement( 'DIV', {
         style: 'position: absolute; overflow: hidden; top:' +
-            (body.scrollTop + 30) + 'px; left: 0; width: 1px; height: 1px;'
+            ( body.scrollTop +
+                ( startBlock ? startBlock.getBoundingClientRect().top : 0 ) ) +
+            'px; left: 0; width: 1px; height: 1px;'
     });
     body.appendChild( pasteArea );
     range.selectNodeContents( pasteArea );
@@ -2794,8 +2751,11 @@ var keyHandlers = {
         if ( !range ) { return; }
 
         // Save undo checkpoint and add any links in the preceding section.
+        // Remove any zws so we don't think there's content in an empty
+        // block.
         self._recordUndoState( range );
         addLinks( range.startContainer );
+        self._removeZWS();
         self._getRangeAndRemoveBookmark( range );
 
         // Selected text is overwritten, therefore delete the contents
@@ -2903,7 +2863,7 @@ var keyHandlers = {
             // If you try to select the contents of a 'BR', FF will not let
             // you type anything!
             if ( !child || child.nodeName === 'BR' ||
-                    ( child.nodeType === TEXT_NODE && !isOpera ) ) {
+                    ( child.nodeType === TEXT_NODE && !isPresto ) ) {
                 break;
             }
             nodeAfterSplit = child;
@@ -2928,11 +2888,13 @@ var keyHandlers = {
         self._docWasChanged();
     },
     backspace: function ( self, event ) {
+        self._removeZWS();
+        // Record undo checkpoint.
         var range = self.getSelection();
+        self._recordUndoState( range );
+        self._getRangeAndRemoveBookmark( range );
         // If not collapsed, delete contents
         if ( !range.collapsed ) {
-            self._recordUndoState( range );
-            self._getRangeAndRemoveBookmark( range );
             event.preventDefault();
             deleteContentsOfRange( range );
             self._ensureBottomLine();
@@ -2941,8 +2903,6 @@ var keyHandlers = {
         }
         // If at beginning of block, merge with previous
         else if ( rangeDoesStartAtBlockBoundary( range ) ) {
-            self._recordUndoState( range );
-            self._getRangeAndRemoveBookmark( range );
             event.preventDefault();
             var current = getStartBlockOfRange( range ),
                 previous = current && getPreviousBlock( current );
@@ -2985,21 +2945,18 @@ var keyHandlers = {
         // Otherwise, leave to browser but check afterwards whether it has
         // left behind an empty inline tag.
         else {
-            var text = range.startContainer.data || '';
-            if ( !notWS.test( text.charAt( range.startOffset - 1 ) ) ) {
-                self._recordUndoState( range );
-                self._getRangeAndRemoveBookmark( range );
-                self.setSelection( range );
-            }
+            self.setSelection( range );
             setTimeout( function () { afterDelete( self ); }, 0 );
         }
     },
     'delete': function ( self, event ) {
+        self._removeZWS();
+        // Record undo checkpoint.
         var range = self.getSelection();
+        self._recordUndoState( range );
+        self._getRangeAndRemoveBookmark( range );
         // If not collapsed, delete contents
         if ( !range.collapsed ) {
-            self._recordUndoState( range );
-            self._getRangeAndRemoveBookmark( range );
             event.preventDefault();
             deleteContentsOfRange( range );
             self._ensureBottomLine();
@@ -3008,8 +2965,6 @@ var keyHandlers = {
         }
         // If at end of block, merge next into this block
         else if ( rangeDoesEndAtBlockBoundary( range ) ) {
-            self._recordUndoState( range );
-            self._getRangeAndRemoveBookmark( range );
             event.preventDefault();
             var current = getStartBlockOfRange( range ),
                 next = current && getNextBlock( current );
@@ -3038,17 +2993,12 @@ var keyHandlers = {
         // Otherwise, leave to browser but check afterwards whether it has
         // left behind an empty inline tag.
         else {
-            // Record undo point if deleting whitespace
-            var text = range.startContainer.data || '';
-            if ( !notWS.test( text.charAt( range.startOffset ) ) ) {
-                self._recordUndoState( range );
-                self._getRangeAndRemoveBookmark( range );
-                self.setSelection( range );
-            }
+            self.setSelection( range );
             setTimeout( function () { afterDelete( self ); }, 0 );
         }
     },
     tab: function ( self, event ) {
+        self._removeZWS();
         var range = self.getSelection(),
             node, parent;
         // If no selection and in an empty block
@@ -3087,6 +3037,7 @@ var keyHandlers = {
         self._removeZWS();
     }
 };
+
 // Firefox incorrectly handles Cmd-left/Cmd-right on Mac:
 // it goes back/forward in history! Override to do the right
 // thing.
@@ -3132,7 +3083,7 @@ proto._onKey = function ( event ) {
 
     // On keypress, delete and '.' both have event.keyCode 46
     // Must check event.which to differentiate.
-    if ( isOpera && event.which === 46 ) {
+    if ( isPresto && event.which === 46 ) {
         key = '.';
     }
 
@@ -3141,9 +3092,15 @@ proto._onKey = function ( event ) {
         key = 'f' + ( code - 111 );
     }
 
-    if ( event.altKey ) { modifiers += 'alt-'; }
-    if ( event.ctrlKey ) { modifiers += 'ctrl-'; }
-    if ( event.metaKey ) { modifiers += 'meta-'; }
+    // We need to apply the backspace/delete handlers regardless of
+    // control key modifiers.
+    if ( key !== 'backspace' && key !== 'delete' ) {
+        if ( event.altKey  ) { modifiers += 'alt-'; }
+        if ( event.ctrlKey ) { modifiers += 'ctrl-'; }
+        if ( event.metaKey ) { modifiers += 'meta-'; }
+    }
+    // However, on Windows, shift-delete is apparently "cut" (WTF right?), so
+    // we want to let the browser handle shift-delete.
     if ( event.shiftKey ) { modifiers += 'shift-'; }
 
     key = modifiers + key;
@@ -3463,7 +3420,6 @@ proto.removeList = command( 'modifyBlocks', removeList );
 
 proto.increaseListLevel = command( 'modifyBlocks', increaseListLevel );
 proto.decreaseListLevel = command( 'modifyBlocks', decreaseListLevel );
-/*global top, win, doc, Squire */
 
 if ( top !== win ) {
     win.editor = new Squire( doc );
diff --git a/build/squire.js b/build/squire.js
index 80873b6..3d17527 100644
--- a/build/squire.js
+++ b/build/squire.js
@@ -1,2 +1,2 @@
-!function(e,t){"use strict";function n(e,t,n){this.root=this.currentNode=e,this.nodeType=t,this.filter=n}function r(e,t){for(var n=e.length;n--;)if(!t(e[n]))return!1;return!0}function o(e,t,n){if(e.nodeName!==t)return!1;for(var r in n)if(e.getAttribute(r)!==n[r])return!1;return!0}function i(e,t){return e.nodeType===t.nodeType&&e.nodeName===t.nodeName&&e.className===t.className&&(!e.style&&!t.style||e.style.cssText===t.style.cssText)}function a(e){return e.nodeType===A&&!!rt[e.nodeName]}function s(e){return nt.test(e.nodeName)}function d(e){return e.nodeType===A&&!s(e)&&r(e.childNodes,s)}function l(e){return e.nodeType===A&&!s(e)&&!d(e)}function c(e){return d(e)?D:I}function f(e){var t=e.ownerDocument,r=new n(t.body,x,c,!1);return r.currentNode=e,r}function h(e){return f(e).previousNode()}function u(e){return f(e).nextNode()}function p(e,t,n){do if(o(e,t,n))return e;while(e=e.parentNode);return null}function m(e){var t,n,r,o,i=e.parentNode;return i&&e.nodeType===A?(t=m(i),t+=(t?">":"")+e.nodeName,(n=e.id)&&(t+="#"+n),(r=e.className.trim())&&(o=r.split(/\s\s*/),o.sort(),t+=".",t+=o.join("."))):t=i?m(i):"",t}function g(e){var t=e.nodeType;return t===A?e.childNodes.length:e.length||0}function v(e){var t=e.parentNode;return t&&t.removeChild(e),e}function N(e,t){var n=e.parentNode;n&&n.replaceChild(t,e)}function S(e){for(var t=e.ownerDocument.createDocumentFragment(),n=e.childNodes,r=n?n.length:0;r--;)t.appendChild(e.firstChild);return t}function C(e){var t,n,r=e.ownerDocument,o=e;if("BODY"===e.nodeName&&((n=e.firstChild)&&"BR"!==n.nodeName||(t=r.createElement("DIV"),n?e.replaceChild(t,n):e.appendChild(t),e=t,t=null)),s(e))e.firstChild||(Y?(t=r.createTextNode("​"),V.editor&&V.editor._didAddZWS()):t=r.createTextNode(""));else if($){for(;e.nodeType!==O&&!a(e);){if(n=e.firstChild,!n){t=r.createTextNode("");break}e=n}e.nodeType===O?/^ +$/.test(e.data)&&(e.data=""):a(e)&&e.parentNode.insertBefore(r.createTextNode(""),e)}else if(!e.querySelector("BR"))for(t=r.createElement("BR");(n=e.lastElementChild)&&!s(n);)e=n;return t&&e.appendChild(t),o}function _(e,t,n){var r,o,i,a=e.nodeType;if(a===O&&e!==n)return _(e.parentNode,e.splitText(t),n);if(a===A){if("number"==typeof t&&(t=t<e.childNodes.length?e.childNodes[t]:null),e===n)return t;for(r=e.parentNode,o=e.cloneNode(!1);t;)i=t.nextSibling,o.appendChild(t),t=i;return C(e),C(o),(i=e.nextSibling)?r.insertBefore(o,i):r.appendChild(o),_(r,o,n)}return t}function y(e,t){if(e.nodeType===A)for(var n,r,o,a=e.childNodes,d=a.length,l=[];d--;)if(n=a[d],r=d&&a[d-1],d&&s(n)&&i(n,r)&&!rt[n.nodeName])t.startContainer===n&&(t.startContainer=r,t.startOffset+=g(r)),t.endContainer===n&&(t.endContainer=r,t.endOffset+=g(r)),t.startContainer===e&&(t.startOffset>d?t.startOffset-=1:t.startOffset===d&&(t.startContainer=r,t.startOffset=g(r))),t.endContainer===e&&(t.endOffset>d?t.endOffset-=1:t.endOffset===d&&(t.endContainer=r,t.endOffset=g(r))),v(n),n.nodeType===O?r.appendData(n.data):l.push(S(n));else if(n.nodeType===A){for(o=l.length;o--;)n.appendChild(l.pop());y(n,t)}}function E(e,t,n){for(var r,o,i,a=t;1===a.parentNode.childNodes.length;)a=a.parentNode;v(a),o=e.childNodes.length,r=e.lastChild,r&&"BR"===r.nodeName&&(e.removeChild(r),o-=1),i={startContainer:e,startOffset:o,endContainer:e,endOffset:o},e.appendChild(S(t)),y(e,i),n.setStart(i.startContainer,i.startOffset),n.collapse(!0),Z&&(r=e.lastChild)&&"BR"===r.nodeName&&e.removeChild(r)}function T(e){var t,n,r=e.previousSibling,o=e.firstChild,a=e.ownerDocument,s="LI"===e.nodeName;if(!s||o&&/^[OU]L$/.test(o.nodeName))if(r&&i(r,e)){if(!l(r)){if(!s)return;n=a.createElement("DIV"),n.appendChild(S(r)),r.appendChild(n)}v(e),t=!l(e),r.appendChild(S(e)),t&&B(r),o&&T(o)}else s&&(r=a.createElement("DIV"),e.insertBefore(r,o),C(r))}function B(e){var t,n,r,o,i=e.childNodes,a=e.ownerDocument,d=null;for(t=0,n=i.length;n>t;t+=1)r=i[t],o="BR"===r.nodeName,!o&&s(r)?(d||(d=k(a,"DIV")),d.appendChild(r),t-=1,n-=1):(o||d)&&(d||(d=k(a,"DIV")),C(d),o?e.replaceChild(d,r):(e.insertBefore(d,r),t+=1,n+=1),d=null),l(r)&&B(r);return d&&e.appendChild(C(d)),e}function k(e,n,r,o){var i,a,s,d,l=e.createElement(n);if(r instanceof Array&&(o=r,r=null),r)for(i in r)a=r[i],a!==t&&l.setAttribute(i,r[i]);if(o)for(s=0,d=o.length;d>s;s+=1)l.appendChild(o[s]);return l}function b(e){var n=e.defaultView,r=e.body;this._win=n,this._doc=e,this._body=r,this._events={},this._lastSelection=null,j&&this.addEventListener("beforedeactivate",this.getSelection),this._hasZWS=!1,this._lastAnchorNode=null,this._lastFocusNode=null,this._path="",this.addEventListener("keyup",this._updatePathOnEvent),this.addEventListener("mouseup",this._updatePathOnEvent),n.addEventListener("focus",this,!1),n.addEventListener("blur",this,!1),this._undoIndex=-1,this._undoStack=[],this._undoStackLength=0,this._isInUndoState=!1,this.defaultBlockProperties=t,this.addEventListener("keyup",this._docWasChanged),this._awaitingPaste=!1,this.addEventListener(z?"beforecut":"cut",this._onCut),this.addEventListener(z?"beforepaste":"paste",this._onPaste),q&&this.addEventListener("keyup",this._ieSelAllClean),this.addEventListener(Z?"keypress":"keydown",this._onKey),X&&(n.Text.prototype.splitText=function(e){var t=this.ownerDocument.createTextNode(this.data.slice(e)),n=this.nextSibling,r=this.parentNode,o=this.length-e;return n?r.insertBefore(t,n):r.appendChild(t),o&&this.deleteData(e,o),t}),r.setAttribute("contenteditable","true"),this.setHTML("");try{e.execCommand("enableObjectResizing",!1,"false"),e.execCommand("enableInlineTableEditing",!1,"false")}catch(o){}}var R=2,A=1,O=3,x=1,L=4,D=1,I=3,P=0,U=1,w=2,F=3,V=e.defaultView,H=navigator.userAgent,M=/iP(?:ad|hone|od)/.test(H),W=/Mac OS X/.test(H),K=/Gecko\//.test(H),z=/Trident\/[456]\./.test(H),q=8===V.ie,Z=!!V.opera,Q=/WebKit\//.test(H),G=W?"meta-":"ctrl-",$=z||Z,Y=z||Q,j=z,X=function(){var t=e.createElement("DIV"),n=e.createTextNode("12");return t.appendChild(n),n.splitText(2),2!==t.childNodes.length}(),J=/[^ \t\r\n]/,et=Array.prototype.indexOf,tt={1:1,2:2,3:4,8:128,9:256,11:1024};n.prototype.nextNode=function(){for(var e,t=this.currentNode,n=this.root,r=this.nodeType,o=this.filter;;){for(e=t.firstChild;!e&&t&&t!==n;)e=t.nextSibling,e||(t=t.parentNode);if(!e)return null;if(tt[e.nodeType]&r&&o(e)===D)return this.currentNode=e,e;t=e}},n.prototype.previousNode=function(){for(var e,t=this.currentNode,n=this.root,r=this.nodeType,o=this.filter;;){if(t===n)return null;if(e=t.previousSibling)for(;t=e.lastChild;)e=t;else e=t.parentNode;if(!e)return null;if(tt[e.nodeType]&r&&o(e)===D)return this.currentNode=e,e;t=e}};var nt=/^(?:#text|A(?:BBR|CRONYM)?|B(?:R|D[IO])?|C(?:ITE|ODE)|D(?:ATA|FN|EL)|EM|FONT|HR|I(?:NPUT|MG|NS)?|KBD|Q|R(?:P|T|UBY)|S(?:U[BP]|PAN|TR(?:IKE|ONG)|MALL|AMP)?|U|VAR|WBR)$/,rt={BR:1,IMG:1,INPUT:1},ot=function(e,t){for(var n=e.childNodes;t&&e.nodeType===A;)e=n[t-1],n=e.childNodes,t=n.length;return e},it=function(e,t){if(e.nodeType===A){var n=e.childNodes;if(t<n.length)e=n[t];else{for(;e&&!e.nextSibling;)e=e.parentNode;e&&(e=e.nextSibling)}}return e},at=function(e,t){e=e.cloneRange(),ut(e);for(var r=e.startContainer,o=e.endContainer,i=e.commonAncestorContainer,a=new n(i,L,function(){return D},!1),s=a.currentNode=r;!t(s,e)&&s!==o&&(s=a.nextNode()););},st=function(e){var t="";return at(e,function(e,n){var r=e.data;r&&/\S/.test(r)&&(e===n.endContainer&&(r=r.slice(0,n.endOffset)),e===n.startContainer&&(r=r.slice(n.startOffset)),t+=r)}),t},dt=function(e,t){var n,r,o,i,a=e.startContainer,s=e.startOffset,d=e.endContainer,l=e.endOffset;a.nodeType===O?(n=a.parentNode,r=n.childNodes,s===a.length?(s=et.call(r,a)+1,e.collapsed&&(d=n,l=s)):(s&&(i=a.splitText(s),d===a?(l-=s,d=i):d===n&&(l+=1),a=i),s=et.call(r,a)),a=n):r=a.childNodes,o=r.length,s===o?a.appendChild(t):a.insertBefore(t,r[s]),a===d&&(l+=r.length-o),e.setStart(a,s),e.setEnd(d,l)},lt=function(e,t){var n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset;t||(t=e.commonAncestorContainer),t.nodeType===O&&(t=t.parentNode);for(var a,s=_(o,i,t),d=_(n,r,t),l=t.ownerDocument.createDocumentFragment();d!==s;)a=d.nextSibling,l.appendChild(d),d=a;return e.setStart(t,s?et.call(t.childNodes,s):t.childNodes.length),e.collapse(!0),C(t),l},ct=function(e){pt(e),lt(e);var t=mt(e),n=gt(e);t&&n&&t!==n&&E(t,n,e),t&&C(t);var r=e.endContainer.ownerDocument.body,o=r.firstChild;o&&"BR"!==o.nodeName||(C(r),e.selectNodeContents(r.firstChild));var i=e.collapsed;ut(e),i&&e.collapse(!0)},ft=function(e,t){for(var n=!0,r=t.childNodes,o=r.length;o--;)if(!s(r[o])){n=!1;break}if(e.collapsed||ct(e),ut(e),n)dt(e,t),e.collapse(!1);else{for(var i,a,d=_(e.startContainer,e.startOffset,e.startContainer.ownerDocument.body),l=d.previousSibling,c=l,f=c.childNodes.length,h=d,p=0,m=d.parentNode;(i=c.lastChild)&&i.nodeType===A&&"BR"!==i.nodeName;)c=i,f=c.childNodes.length;for(;(i=h.firstChild)&&i.nodeType===A&&"BR"!==i.nodeName;)h=i;for(;(i=t.firstChild)&&s(i);)c.appendChild(i);for(;(i=t.lastChild)&&s(i);)h.insertBefore(i,h.firstChild),p+=1;for(a=t;a=u(a);)C(a);m.insertBefore(t,d),a=d.previousSibling,d.textContent?T(d):m.removeChild(d),d.parentNode||(h=a,p=g(h)),l.textContent?T(l):(c=l.nextSibling,f=0,m.removeChild(l)),e.setStart(c,f),e.setEnd(h,p),ut(e)}},ht=function(e,t,n){var r=t.ownerDocument.createRange();if(r.selectNode(t),n){var o=e.compareBoundaryPoints(F,r)>-1,i=e.compareBoundaryPoints(U,r)<1;return!o&&!i}var a=e.compareBoundaryPoints(P,r)<1,s=e.compareBoundaryPoints(w,r)>-1;return a&&s},ut=function(e){for(var t,n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset;n.nodeType!==O&&(t=n.childNodes[r],t&&!a(t));)n=t,r=0;if(i)for(;o.nodeType!==O&&(t=o.childNodes[i-1],t&&!a(t));)o=t,i=g(o);else for(;o.nodeType!==O&&(t=o.firstChild,t&&!a(t));)o=t;e.collapsed?(e.setStart(o,i),e.setEnd(n,r)):(e.setStart(n,r),e.setEnd(o,i))},pt=function(e,t){var n,r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;for(t||(t=e.commonAncestorContainer);r!==t&&!o;)n=r.parentNode,o=et.call(n.childNodes,r),r=n;for(;i!==t&&a===g(i);)n=i.parentNode,a=et.call(n.childNodes,i)+1,i=n;e.setStart(r,o),e.setEnd(i,a)},mt=function(e){var t,n=e.startContainer;return s(n)?t=h(n):d(n)?t=n:(t=ot(n,e.startOffset),t=u(t)),t&&ht(e,t,!0)?t:null},gt=function(e){var t,n,r=e.endContainer;if(s(r))t=h(r);else if(d(r))t=r;else{if(t=it(r,e.endOffset),!t)for(t=r.ownerDocument.body;n=t.lastChild;)t=n;t=h(t)}return t&&ht(e,t,!0)?t:null},vt=function(e){for(var t,n,r=e.startContainer,o=e.startOffset;s(r);){if(o)return!1;t=r.parentNode,o=et.call(t.childNodes,r),r=t}for(;o&&(n=r.childNodes[o-1])&&(""===n.data||"BR"===n.nodeName);)o-=1;return!o},Nt=function(e){for(var t,n,r=e.endContainer,o=e.endOffset,i=g(r);s(r);){if(o!==i)return!1;t=r.parentNode,o=et.call(t.childNodes,r)+1,r=t,i=r.childNodes.length}for(;i>o&&(n=r.childNodes[o])&&(""===n.data||"BR"===n.nodeName);)o+=1;return o===i},St=function(e){var t,n=mt(e),r=gt(e);n&&r&&(t=n.parentNode,e.setStart(t,et.call(t.childNodes,n)),t=r.parentNode,e.setEnd(t,et.call(t.childNodes,r)+1))},Ct=b.prototype;Ct.createElement=function(e,t,n){return k(this._doc,e,t,n)},Ct.createDefaultBlock=function(e){return C(this.createElement("DIV",this.defaultBlockProperties,e))},Ct.didError=function(e){console.log(e)},Ct.getDocument=function(){return this._doc};var _t={focus:1,blur:1,pathChange:1,select:1,input:1,undoStateChange:1};Ct.fireEvent=function(e,t){var n,r,o,i=this._events[e];if(i)for(t||(t={}),t.type!==e&&(t.type=e),i=i.slice(),n=0,r=i.length;r>n;n+=1){o=i[n];try{o.handleEvent?o.handleEvent(t):o.call(this,t)}catch(a){a.details="Squire: fireEvent error. Event type: "+e,this.didError(a)}}return this},Ct.handleEvent=function(e){this.fireEvent(e.type,e)},Ct.addEventListener=function(e,t){var n=this._events[e];return t?(n||(n=this._events[e]=[],_t[e]||this._doc.addEventListener(e,this,!1)),n.push(t),this):(this.didError({name:"Squire: addEventListener with null or undefined fn",message:"Event type: "+e}),this)},Ct.removeEventListener=function(e,t){var n,r=this._events[e];if(r){for(n=r.length;n--;)r[n]===t&&r.splice(n,1);r.length||(delete this._events[e],_t[e]||this._doc.removeEventListener(e,this,!1))}return this},Ct._createRange=function(e,t,n,r){if(e instanceof this._win.Range)return e.cloneRange();var o=this._doc.createRange();return o.setStart(e,t),n?o.setEnd(n,r):o.setEnd(e,t),o},Ct.setSelection=function(e){if(e){M&&this._win.focus();var t=this._win.getSelection();t.removeAllRanges(),t.addRange(e)}return this},Ct.getSelection=function(){var e,t,n,r=this._win.getSelection();if(r.rangeCount){e=r.getRangeAt(0).cloneRange(),t=e.startContainer,n=e.endContainer;try{t&&a(t)&&e.setStartBefore(t),n&&a(n)&&e.setEndBefore(n)}catch(o){this.didError({name:"Squire#getSelection error",message:"Starts: "+t.nodeName+"\nEnds: "+n.nodeName})}this._lastSelection=e}else e=this._lastSelection;return e||(e=this._createRange(this._body.firstChild,0)),e},Ct.getSelectedText=function(){return st(this.getSelection())},Ct.getPath=function(){return this._path},Ct._didAddZWS=function(){this._hasZWS=!0},Ct._removeZWS=function(){if(this._hasZWS){for(var e,t,r=new n(this._body,L,function(){return D},!1);e=r.nextNode();)for(;(t=e.data.indexOf("​"))>-1;)e.deleteData(t,1);this._hasZWS=!1}},Ct._updatePath=function(e,t){var n,r=e.startContainer,o=e.endContainer;(t||r!==this._lastAnchorNode||o!==this._lastFocusNode)&&(this._lastAnchorNode=r,this._lastFocusNode=o,n=r&&o?r===o?m(o):"(selection)":"",this._path!==n&&(this._path=n,this.fireEvent("pathChange",{path:n}))),r!==o&&this.fireEvent("select")},Ct._updatePathOnEvent=function(){this._updatePath(this.getSelection())},Ct.focus=function(){return K&&this._body.focus(),this._win.focus(),this},Ct.blur=function(){return K&&this._body.blur(),top.focus(),this};var yt="squire-selection-start",Et="squire-selection-end";Ct._saveRangeToBookmark=function(e){var t,n=this.createElement("INPUT",{id:yt,type:"hidden"}),r=this.createElement("INPUT",{id:Et,type:"hidden"});dt(e,n),e.collapse(!1),dt(e,r),n.compareDocumentPosition(r)&R&&(n.id=Et,r.id=yt,t=n,n=r,r=t),e.setStartAfter(n),e.setEndBefore(r)},Ct._getRangeAndRemoveBookmark=function(e){var t=this._doc,n=t.getElementById(yt),r=t.getElementById(Et);if(n&&r){var o,i=n.parentNode,a=r.parentNode,s={startContainer:i,endContainer:a,startOffset:et.call(i.childNodes,n),endOffset:et.call(a.childNodes,r)};i===a&&(s.endOffset-=1),v(n),v(r),y(i,s),i!==a&&y(a,s),e||(e=t.createRange()),e.setStart(s.startContainer,s.startOffset),e.setEnd(s.endContainer,s.endOffset),o=e.collapsed,ut(e),o&&e.collapse(!0)}return e||null},Ct._docWasChanged=function(e){var t=e&&e.keyCode;(!e||!e.ctrlKey&&!e.metaKey&&!e.altKey&&(16>t||t>20)&&(33>t||t>45))&&(this._isInUndoState&&(this._isInUndoState=!1,this.fireEvent("undoStateChange",{canUndo:!0,canRedo:!1})),this.fireEvent("input"))},Ct._recordUndoState=function(e){if(!this._isInUndoState){var t=this._undoIndex+=1,n=this._undoStack;t<this._undoStackLength&&(n.length=this._undoStackLength=t),e&&this._saveRangeToBookmark(e),n[t]=this._getHTML(),this._undoStackLength+=1,this._isInUndoState=!0}},Ct.undo=function(){if(0!==this._undoIndex||!this._isInUndoState){this._recordUndoState(this.getSelection()),this._undoIndex-=1,this._setHTML(this._undoStack[this._undoIndex]);var e=this._getRangeAndRemoveBookmark();e&&this.setSelection(e),this._isInUndoState=!0,this.fireEvent("undoStateChange",{canUndo:0!==this._undoIndex,canRedo:!0}),this.fireEvent("input")}return this},Ct.redo=function(){var e=this._undoIndex,t=this._undoStackLength;if(t>e+1&&this._isInUndoState){this._undoIndex+=1,this._setHTML(this._undoStack[this._undoIndex]);var n=this._getRangeAndRemoveBookmark();n&&this.setSelection(n),this.fireEvent("undoStateChange",{canUndo:!0,canRedo:t>e+2}),this.fireEvent("input")}return this},Ct.hasFormat=function(e,t,r){if(e=e.toUpperCase(),t||(t={}),!r&&!(r=this.getSelection()))return!1;var o,i,a=r.commonAncestorContainer;if(p(a,e,t))return!0;if(a.nodeType===O)return!1;o=new n(a,L,function(e){return ht(r,e,!0)?D:I},!1);for(var s=!1;i=o.nextNode();){if(!p(i,e,t))return!1;s=!0}return s},Ct._addFormat=function(e,t,r){var o,i,a,s,d,l,c,f;if(r.collapsed)o=C(this.createElement(e,t)),dt(r,o),r.setStart(o.firstChild,o.firstChild.length),r.collapse(!0);else{i=new n(r.commonAncestorContainer,L,function(e){return ht(r,e,!0)?D:I},!1),d=0,l=0,c=i.currentNode=r.startContainer,c.nodeType!==O&&(c=i.nextNode());do f=!p(c,e,t),c===r.endContainer&&(f&&c.length>r.endOffset?c.splitText(r.endOffset):l=r.endOffset),c===r.startContainer&&(f&&r.startOffset?c=c.splitText(r.startOffset):d=r.startOffset),f&&(o=this.createElement(e,t),N(c,o),o.appendChild(c),l=c.length),s=c,a||(a=s);while(c=i.nextNode());r=this._createRange(a,d,s,l)}return r},Ct._removeFormat=function(e,t,n,r){this._saveRangeToBookmark(n);var i,a=this._doc;n.collapsed&&(Y?(i=a.createTextNode("​"),this._didAddZWS()):i=a.createTextNode(""),dt(n,i));for(var d=n.commonAncestorContainer;s(d);)d=d.parentNode;var l=n.startContainer,c=n.startOffset,f=n.endContainer,h=n.endOffset,u=[],p=function(e,t){if(!ht(n,e,!1)){var r,o,i=e.nodeType===O;if(!ht(n,e,!0))return void("INPUT"===e.nodeName||i&&!e.data||u.push([t,e]));if(i)e===f&&h!==e.length&&u.push([t,e.splitText(h)]),e===l&&c&&(e.splitText(c),u.push([t,e]));else for(r=e.firstChild;r;r=o)o=r.nextSibling,p(r,t)}},m=Array.prototype.filter.call(d.getElementsByTagName(e),function(r){return ht(n,r,!0)&&o(r,e,t)});r||m.forEach(function(e){p(e,e)}),u.forEach(function(e){var t=e[0].cloneNode(!1),n=e[1];N(n,t),t.appendChild(n)}),m.forEach(function(e){N(e,S(e))}),this._getRangeAndRemoveBookmark(n),i&&n.collapse(!1);var g={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset};return y(d,g),n.setStart(g.startContainer,g.startOffset),n.setEnd(g.endContainer,g.endOffset),n},Ct.changeFormat=function(e,t,n,r){return n||(n=this.getSelection())?(this._recordUndoState(n),this._getRangeAndRemoveBookmark(n),t&&(n=this._removeFormat(t.tag.toUpperCase(),t.attributes||{},n,r)),e&&(n=this._addFormat(e.tag.toUpperCase(),e.attributes||{},n)),this.setSelection(n),this._updatePath(n,!0),this._docWasChanged(),this):void 0};var Tt={DIV:"DIV",PRE:"DIV",H1:"DIV",H2:"DIV",H3:"DIV",H4:"DIV",H5:"DIV",H6:"DIV",P:"DIV",DT:"DD",DD:"DT",LI:"LI"},Bt=function(e,t,n){var r=Tt[e.nodeName],o=_(t,n,e.parentNode);return o.nodeName!==r&&(e=k(o.ownerDocument,r),e.className="rtl"===o.dir?"dir-rtl":"",e.dir=o.dir,N(o,e),e.appendChild(S(o)),o=e),o};Ct.forEachBlock=function(e,t,n){if(!n&&!(n=this.getSelection()))return this;t&&(this._recordUndoState(n),this._getRangeAndRemoveBookmark(n));var r=mt(n),o=gt(n);if(r&&o)do if(e(r)||r===o)break;while(r=u(r));return t&&(this.setSelection(n),this._updatePath(n,!0),this._docWasChanged()),this},Ct.modifyBlocks=function(e,t){if(!t&&!(t=this.getSelection()))return this;this._isInUndoState?this._saveRangeToBookmark(t):this._recordUndoState(t),St(t);var n,r=this._body;return pt(t,r),n=lt(t,r),dt(t,e.call(this,n)),t.endOffset<t.endContainer.childNodes.length&&T(t.endContainer.childNodes[t.endOffset]),T(t.startContainer.childNodes[t.startOffset]),this._getRangeAndRemoveBookmark(t),this.setSelection(t),this._updatePath(t,!0),this._docWasChanged(),this};var kt=function(e){return this.createElement("BLOCKQUOTE",[e])},bt=function(e){var t=e.querySelectorAll("blockquote");return Array.prototype.filter.call(t,function(e){return!p(e.parentNode,"BLOCKQUOTE")}).forEach(function(e){N(e,S(e))}),e},Rt=function(){return this.createDefaultBlock([this.createElement("INPUT",{id:yt,type:"hidden"}),this.createElement("INPUT",{id:Et,type:"hidden"})])},At=function(e,n,r){for(var o,i,a,s,d=f(n);o=d.nextNode();)i=o.parentNode.nodeName,"LI"!==i?(s=e.createElement("LI",{"class":"rtl"===o.dir?"dir-rtl":t,dir:o.dir||t}),(a=o.previousSibling)&&a.nodeName===r?a.appendChild(s):N(o,e.createElement(r,[s])),s.appendChild(o)):(o=o.parentNode.parentNode,i=o.nodeName,i!==r&&/^[OU]L$/.test(i)&&N(o,e.createElement(r,[S(o)])))},Ot=function(e){return At(this,e,"UL"),e},xt=function(e){return At(this,e,"OL"),e},Lt=function(e){var t,n,r,o,i,a,s,d=e.querySelectorAll("UL, OL");for(t=0,n=d.length;n>t;t+=1){for(o=d[t],i=S(o),a=i.childNodes,r=a.length;r--;)s=a[r],N(s,S(s));B(i),N(o,i)}return e},Dt=function(e){var t,n,r,o,i,a=e.querySelectorAll("LI");for(t=0,n=a.length;n>t;t+=1)r=a[t],l(r.firstChild)||(o=r.parentNode.nodeName,i=r.previousSibling,i&&(i=i.lastChild)&&i.nodeName===o||N(r,this.createElement("LI",[i=this.createElement(o)])),i.appendChild(r));return e},It=function(e){var t=e.querySelectorAll("LI");return Array.prototype.filter.call(t,function(e){return!l(e.firstChild)}).forEach(function(t){var n,r=t.parentNode,o=r.parentNode,i=t.firstChild,a=i;for(t.previousSibling&&(r=_(r,t,o));a&&(n=a.nextSibling,!l(a));)o.insertBefore(a,r),a=n;for("LI"===o.nodeName&&i.previousSibling&&_(o,i,o.parentNode);t!==e&&!t.childNodes.length;)r=t.parentNode,r.removeChild(t),t=r},this),B(e),e},Pt=/\b((?:(?:ht|f)tps?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,}\/)(?:[^\s()<>]+|\([^\s()<>]+\))+(?:\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))|([\w\-.%+]+@(?:[\w\-]+\.)+[A-Z]{2,}\b)/i,Ut=function(e){for(var t,r,o,i,a,s,d,l=e.ownerDocument,c=new n(e,L,function(e){return p(e,"A")?I:D},!1);t=c.nextNode();)for(r=t.data,o=t.parentNode;i=Pt.exec(r);)a=i.index,s=a+i[0].length,a&&(d=l.createTextNode(r.slice(0,a)),o.insertBefore(d,t)),d=l.createElement("A"),d.textContent=r.slice(a,s),d.href=i[1]?/^(?:ht|f)tps?:/.test(i[1])?i[1]:"http://"+i[1]:"mailto:"+i[2],o.insertBefore(d,t),t.data=r=r.slice(s)},wt=/^(?:A(?:DDRESS|RTICLE|SIDE)|BLOCKQUOTE|CAPTION|D(?:[DLT]|IV)|F(?:IGURE|OOTER)|H[1-6]|HEADER|L(?:ABEL|EGEND|I)|O(?:L|UTPUT)|P(?:RE)?|SECTION|T(?:ABLE|BODY|D|FOOT|H|HEAD|R)|UL)$/,Ft={1:10,2:13,3:16,4:18,5:24,6:32,7:48},Vt={backgroundColor:{regexp:J,replace:function(e,t){return k(e,"SPAN",{"class":"highlight",style:"background-color: "+t})}},color:{regexp:J,replace:function(e,t){return k(e,"SPAN",{"class":"colour",style:"color:"+t})}},fontWeight:{regexp:/^bold/i,replace:function(e){return k(e,"B")}},fontStyle:{regexp:/^italic/i,replace:function(e){return k(e,"I")}},fontFamily:{regexp:J,replace:function(e,t){return k(e,"SPAN",{"class":"font",style:"font-family:"+t})}},fontSize:{regexp:J,replace:function(e,t){return k(e,"SPAN",{"class":"size",style:"font-size:"+t})}}},Ht=function(e){return function(t,n){var r=k(t.ownerDocument,e);return n.replaceChild(r,t),r.appendChild(S(t)),r}},Mt={SPAN:function(e,t){var n,r,o,i,a,s,d=e.style,l=e.ownerDocument;for(n in Vt)r=Vt[n],o=d[n],o&&r.regexp.test(o)&&(s=r.replace(l,o),i&&i.appendChild(s),i=s,a||(a=s));return a&&(i.appendChild(S(e)),t.replaceChild(a,e)),i||e},STRONG:Ht("B"),EM:Ht("I"),STRIKE:Ht("S"),FONT:function(e,t){var n,r,o,i,a,s=e.face,d=e.size,l=e.color,c=e.ownerDocument;return s&&(n=k(c,"SPAN",{"class":"font",style:"font-family:"+s}),a=n,i=n),d&&(r=k(c,"SPAN",{"class":"size",style:"font-size:"+Ft[d]+"px"}),a||(a=r),i&&i.appendChild(r),i=r),l&&/^#?([\dA-F]{3}){1,2}$/i.test(l)&&("#"!==l.charAt(0)&&(l="#"+l),o=k(c,"SPAN",{"class":"colour",style:"color:"+l}),a||(a=o),i&&i.appendChild(o),i=o),a||(a=i=k(c,"SPAN")),t.replaceChild(a,e),i.appendChild(S(e)),i},TT:function(e,t){var n=k(e.ownerDocument,"SPAN",{"class":"font",style:'font-family:menlo,consolas,"courier new",monospace'});return t.replaceChild(n,e),n.appendChild(S(e)),n}},Wt=function(e){for(var t,n=e.childNodes,r=n.length;r--;)t=n[r],t.nodeType===A&&"IMG"!==t.nodeName&&(Wt(t),s(t)&&!t.firstChild&&e.removeChild(t))},Kt=function(e,t){var n,r,o,i,a,d,l,c,f,h,u=e.childNodes;for(n=0,r=u.length;r>n;n+=1)if(o=u[n],i=o.nodeName,a=o.nodeType,d=Mt[i],a===A){if(l=o.childNodes.length,d)o=d(o,e);else{if(!wt.test(i)&&!s(o)){n-=1,r+=l-1,e.replaceChild(S(o),o);continue}!t&&o.style.cssText&&o.removeAttribute("style")}l&&Kt(o,t)}else{if(a===O&&(c=o.data,/\S/.test(c))){if(s(e))continue;if(f=0,h=c.length,!n||!s(u[n-1])){for(;h>f&&!J.test(c.charAt(f));)f+=1;f&&(o.data=c=c.slice(f),h-=f)}if(n+1===r||!s(u[n+1])){for(f=h;f>0&&!J.test(c.charAt(f-1));)f-=1;h>f&&(o.data=c.slice(0,f))}continue}e.removeChild(o),n-=1,r-=1}return e},zt=function(e){return(e.nodeType===A?"BR"===e.nodeName:J.test(e.data))?D:I},qt=function(e){for(var t,r=e.parentNode;s(r);)r=r.parentNode;return t=new n(r,x|L,zt),t.currentNode=e,!!t.nextNode()},Zt=function(e){var t,n,r,o=e.querySelectorAll("BR"),i=[],a=o.length;for(t=0;a>t;t+=1)i[t]=qt(o[t]);for(;a--;)if(n=o[a],r=n.parentNode){for(;s(r);)r=r.parentNode;d(r)&&Tt[r.nodeName]?(i[a]&&Bt(r,n.parentNode,n),v(n)):B(r)}};Ct._ensureBottomLine=function(){var e=this._body,t=e.lastChild;t&&"DIV"===t.nodeName&&d(t)||e.appendChild(this.createDefaultBlock())},Ct._onCut=function(){var e=this.getSelection(),t=this;this._recordUndoState(e),this._getRangeAndRemoveBookmark(e),this.setSelection(e),setTimeout(function(){try{t._ensureBottomLine()}catch(e){t.didError(e)}},0)},Ct._onPaste=function(e){if(!this._awaitingPaste){var t,n,r=e.clipboardData,o=r&&r.items,i=!1,a=!1;if(o){for(t=o.length;t--;){if(n=o[t].type,"text/html"===n){a=!1;break}/^image\/.*/.test(n)&&(a=!0)}if(a)return e.preventDefault(),this.fireEvent("dragover",{dataTransfer:r,preventDefault:function(){i=!0}}),void(i&&this.fireEvent("drop",{dataTransfer:r}))}this._awaitingPaste=!0;var s=this,d=this._body,l=this.getSelection(),c=l.startContainer,f=l.startOffset,h=l.endContainer,p=l.endOffset,m=this.createElement("DIV",{style:"position: absolute; overflow: hidden; top:"+(d.scrollTop+30)+"px; left: 0; width: 1px; height: 1px;"});d.appendChild(m),l.selectNodeContents(m),this.setSelection(l),setTimeout(function(){try{var e=S(v(m)),t=e.firstChild,n=s._createRange(c,f,h,p);if(t){t===e.lastChild&&"DIV"===t.nodeName&&e.replaceChild(S(t),t),e.normalize(),Ut(e),Kt(e,!1),Zt(e),Wt(e);for(var r=e,o=!0;r=u(r);)C(r);s.fireEvent("willPaste",{fragment:e,preventDefault:function(){o=!1}}),o&&(ft(n,e),s._docWasChanged(),n.collapse(!1),s._ensureBottomLine())}s.setSelection(n),s._updatePath(n,!0),s._awaitingPaste=!1}catch(i){s.didError(i)}},0)}};var Qt={8:"backspace",9:"tab",13:"enter",32:"space",37:"left",39:"right",46:"delete",219:"[",221:"]"},Gt=function(e){return function(t,n){n.preventDefault(),t[e]()}},$t=function(e,t){return t=t||null,function(n,r){r.preventDefault();var o=n.getSelection();n.hasFormat(e,null,o)?n.changeFormat(null,{tag:e},o):n.changeFormat({tag:e},t,o)}},Yt=function(e){try{var t,n=e.getSelection(),r=n.startContainer;if(r.nodeType===O&&(r=r.parentNode),s(r)&&!r.textContent){do t=r.parentNode;while(s(t)&&!t.textContent&&(r=t));n.setStart(t,et.call(t.childNodes,r)),n.collapse(!0),t.removeChild(r),d(t)||(t=h(t)),C(t),ut(n),e.setSelection(n),e._updatePath(n)}e._ensureBottomLine()}catch(o){e.didError(o)}};q&&(Ct._ieSelAllClean=function(){var e=this._body.firstChild;"P"===e.nodeName&&(this._saveRangeToBookmark(this.getSelection()),N(e,this.createDefaultBlock([S(e)])),this.setSelection(this._getRangeAndRemoveBookmark()))});var jt={enter:function(e,t){t.preventDefault();var n,r,o,i,a,s=e.getSelection();if(s){if(e._recordUndoState(s),Ut(s.startContainer),e._getRangeAndRemoveBookmark(s),s.collapsed||ct(s),n=mt(s),n&&(r=p(n,"LI"))&&(n=r),o=n?n.nodeName:"DIV",i=Tt[o],!n)return dt(s,e.createElement("BR")),s.collapse(!1),e.setSelection(s),e._updatePath(s,!0),void e._docWasChanged();var d,l=s.startContainer,c=s.startOffset;if(i||(l===n&&(l=c?l.childNodes[c-1]:null,c=0,l&&("BR"===l.nodeName?l=l.nextSibling:c=g(l),l&&"BR"!==l.nodeName||(d=C(e.createElement("DIV")),l?n.replaceChild(d,l):n.appendChild(d),l=d))),B(n),i="DIV",l||(l=n.firstChild),s.setStart(l,c),s.setEnd(l,c),n=mt(s)),!n.textContent){if(p(n,"UL")||p(n,"OL"))return e.modifyBlocks(It,s);if(p(n,"BLOCKQUOTE"))return e.modifyBlocks(Rt,s)}for(a=Bt(n,l,c);a.nodeType===A;){var f,h=a.firstChild;if("A"!==a.nodeName){for(;h&&h.nodeType===O&&!h.data&&(f=h.nextSibling,f&&"BR"!==f.nodeName);)v(h),h=f;if(!h||"BR"===h.nodeName||h.nodeType===O&&!Z)break;a=h}else N(a,S(a)),a=h}s=e._createRange(a,0),e.setSelection(s),e._updatePath(s,!0),a.nodeType===O&&(a=a.parentNode);var u=e._doc,m=e._body;a.offsetTop+a.offsetHeight>(u.documentElement.scrollTop||m.scrollTop)+m.offsetHeight&&a.scrollIntoView(!1),e._docWasChanged()}},backspace:function(e,t){var n=e.getSelection();if(n.collapsed)if(vt(n)){e._recordUndoState(n),e._getRangeAndRemoveBookmark(n),t.preventDefault();var r=mt(n),o=r&&h(r);if(o){if(!o.isContentEditable)return void v(o);for(E(o,r,n),r=o.parentNode;r&&!r.nextSibling;)r=r.parentNode;r&&(r=r.nextSibling)&&T(r),e.setSelection(n)}else if(r){if(p(r,"UL")||p(r,"OL"))return e.modifyBlocks(It,n);if(p(r,"BLOCKQUOTE"))return e.modifyBlocks(bt,n);e.setSelection(n),e._updatePath(n,!0)}}else{var i=n.startContainer.data||"";J.test(i.charAt(n.startOffset-1))||(e._recordUndoState(n),e._getRangeAndRemoveBookmark(n),e.setSelection(n)),setTimeout(function(){Yt(e)},0)}else e._recordUndoState(n),e._getRangeAndRemoveBookmark(n),t.preventDefault(),ct(n),e._ensureBottomLine(),e.setSelection(n),e._updatePath(n,!0)},"delete":function(e,t){var n=e.getSelection();if(n.collapsed)if(Nt(n)){e._recordUndoState(n),e._getRangeAndRemoveBookmark(n),t.preventDefault();var r=mt(n),o=r&&u(r);if(o){if(!o.isContentEditable)return void v(o);for(E(r,o,n),o=r.parentNode;o&&!o.nextSibling;)o=o.parentNode;o&&(o=o.nextSibling)&&T(o),e.setSelection(n),e._updatePath(n,!0)}}else{var i=n.startContainer.data||"";J.test(i.charAt(n.startOffset))||(e._recordUndoState(n),e._getRangeAndRemoveBookmark(n),e.setSelection(n)),setTimeout(function(){Yt(e)},0)}else e._recordUndoState(n),e._getRangeAndRemoveBookmark(n),t.preventDefault(),ct(n),e._ensureBottomLine(),e.setSelection(n),e._updatePath(n,!0)},tab:function(e,t){var n,r,o=e.getSelection();if(o.collapsed&&vt(o)&&Nt(o)){for(n=mt(o);r=n.parentNode;){if("UL"===r.nodeName||"OL"===r.nodeName){n.previousSibling&&(t.preventDefault(),e.modifyBlocks(Dt,o));break}n=r}t.preventDefault()}},space:function(e){var t=e.getSelection();e._recordUndoState(t),Ut(t.startContainer),e._getRangeAndRemoveBookmark(t),e.setSelection(t)},left:function(e){e._removeZWS()},right:function(e){e._removeZWS()}};W&&K&&V.getSelection().modify&&(jt["meta-left"]=function(e,t){t.preventDefault(),e._win.getSelection().modify("move","backward","lineboundary")},jt["meta-right"]=function(e,t){t.preventDefault(),e._win.getSelection().modify("move","forward","lineboundary")}),jt[G+"b"]=$t("B"),jt[G+"i"]=$t("I"),jt[G+"u"]=$t("U"),jt[G+"shift-7"]=$t("S"),jt[G+"shift-5"]=$t("SUB",{tag:"SUP"}),jt[G+"shift-6"]=$t("SUP",{tag:"SUB"}),jt[G+"shift-8"]=Gt("makeUnorderedList"),jt[G+"shift-9"]=Gt("makeOrderedList"),jt[G+"["]=Gt("decreaseQuoteLevel"),jt[G+"]"]=Gt("increaseQuoteLevel"),jt[G+"y"]=Gt("redo"),jt[G+"z"]=Gt("undo"),jt[G+"shift-z"]=Gt("redo"),Ct._onKey=function(e){var t=e.keyCode,n=Qt[t],r="";n||(n=String.fromCharCode(t).toLowerCase(),/^[A-Za-z0-9]$/.test(n)||(n="")),Z&&46===e.which&&(n="."),t>111&&124>t&&(n="f"+(t-111)),e.altKey&&(r+="alt-"),e.ctrlKey&&(r+="ctrl-"),e.metaKey&&(r+="meta-"),e.shiftKey&&(r+="shift-"),n=r+n,jt[n]&&jt[n](this,e)},Ct._getHTML=function(){return this._body.innerHTML},Ct._setHTML=function(e){var t=this._body;t.innerHTML=e;do C(t);while(t=u(t))},Ct.getHTML=function(e){var t,n,r,o,i,a=[];if(e&&(i=this.getSelection())&&this._saveRangeToBookmark(i),$)for(t=this._body;t=u(t);)t.textContent||t.querySelector("BR")||(n=this.createElement("BR"),t.appendChild(n),a.push(n));if(r=this._getHTML().replace(/\u200B/g,""),$)for(o=a.length;o--;)v(a[o]);return i&&this._getRangeAndRemoveBookmark(i),r},Ct.setHTML=function(e){var t,n=this._doc.createDocumentFragment(),r=this.createElement("DIV");r.innerHTML=e,n.appendChild(S(r)),Kt(n,!0),Zt(n),B(n);for(var o=n;o=u(o);)C(o);for(var i=this._body;t=i.lastChild;)i.removeChild(t);i.appendChild(n),C(i),this._undoIndex=-1,this._undoStack.length=0,this._undoStackLength=0,this._isInUndoState=!1;var a=this._getRangeAndRemoveBookmark()||this._createRange(i.firstChild,0);return this._recordUndoState(a),this._getRangeAndRemoveBookmark(a),j?this._lastSelection=a:this.setSelection(a),this._updatePath(a,!0),this},Ct.insertElement=function(e,t){if(t||(t=this.getSelection()),t.collapse(!0),s(e))dt(t,e),t.setStartAfter(e);
-else{for(var n,r,o=this._body,i=mt(t)||o;i!==o&&!i.nextSibling;)i=i.parentNode;i!==o&&(n=i.parentNode,r=_(n,i.nextSibling,o)),r?(o.insertBefore(e,r),t.setStart(r,0),t.setStart(r,0),ut(t)):(o.appendChild(e),o.appendChild(this.createDefaultBlock()),t.setStart(e,0),t.setEnd(e,0)),this.focus(),this.setSelection(t),this._updatePath(t)}return this},Ct.insertImage=function(e){var t=this.createElement("IMG",{src:e});return this.insertElement(t),t};var Xt=function(e,t,n){return function(){return this[e](t,n),this.focus()}};Ct.addStyles=function(e){if(e){var t=this._doc.documentElement.firstChild,n=this.createElement("STYLE",{type:"text/css"});n.styleSheet?(t.appendChild(n),n.styleSheet.cssText=e):(n.appendChild(this._doc.createTextNode(e)),t.appendChild(n))}return this},Ct.bold=Xt("changeFormat",{tag:"B"}),Ct.italic=Xt("changeFormat",{tag:"I"}),Ct.underline=Xt("changeFormat",{tag:"U"}),Ct.strikethrough=Xt("changeFormat",{tag:"S"}),Ct.subscript=Xt("changeFormat",{tag:"SUB"},{tag:"SUP"}),Ct.superscript=Xt("changeFormat",{tag:"SUP"},{tag:"SUB"}),Ct.removeBold=Xt("changeFormat",null,{tag:"B"}),Ct.removeItalic=Xt("changeFormat",null,{tag:"I"}),Ct.removeUnderline=Xt("changeFormat",null,{tag:"U"}),Ct.removeStrikethrough=Xt("changeFormat",null,{tag:"S"}),Ct.removeSubscript=Xt("changeFormat",null,{tag:"SUB"}),Ct.removeSuperscript=Xt("changeFormat",null,{tag:"SUP"}),Ct.makeLink=function(e){var t=this.getSelection();if(t.collapsed){var n=e.indexOf(":")+1;if(n)for(;"/"===e[n];)n+=1;dt(t,this._doc.createTextNode(e.slice(n)))}return this.changeFormat({tag:"A",attributes:{href:e}},{tag:"A"},t),this.focus()},Ct.removeLink=function(){return this.changeFormat(null,{tag:"A"},this.getSelection(),!0),this.focus()},Ct.setFontFace=function(e){return this.changeFormat({tag:"SPAN",attributes:{"class":"font",style:"font-family: "+e+", sans-serif;"}},{tag:"SPAN",attributes:{"class":"font"}}),this.focus()},Ct.setFontSize=function(e){return this.changeFormat({tag:"SPAN",attributes:{"class":"size",style:"font-size: "+("number"==typeof e?e+"px":e)}},{tag:"SPAN",attributes:{"class":"size"}}),this.focus()},Ct.setTextColour=function(e){return this.changeFormat({tag:"SPAN",attributes:{"class":"colour",style:"color: "+e}},{tag:"SPAN",attributes:{"class":"colour"}}),this.focus()},Ct.setHighlightColour=function(e){return this.changeFormat({tag:"SPAN",attributes:{"class":"highlight",style:"background-color: "+e}},{tag:"SPAN",attributes:{"class":"highlight"}}),this.focus()},Ct.setTextAlignment=function(e){return this.forEachBlock(function(t){t.className=(t.className.split(/\s+/).filter(function(e){return!/align/.test(e)}).join(" ")+" align-"+e).trim(),t.style.textAlign=e},!0),this.focus()},Ct.setTextDirection=function(e){return this.forEachBlock(function(t){t.className=(t.className.split(/\s+/).filter(function(e){return!/dir/.test(e)}).join(" ")+" dir-"+e).trim(),t.dir=e},!0),this.focus()},Ct.increaseQuoteLevel=Xt("modifyBlocks",kt),Ct.decreaseQuoteLevel=Xt("modifyBlocks",bt),Ct.makeUnorderedList=Xt("modifyBlocks",Ot),Ct.makeOrderedList=Xt("modifyBlocks",xt),Ct.removeList=Xt("modifyBlocks",Lt),Ct.increaseListLevel=Xt("modifyBlocks",Dt),Ct.decreaseListLevel=Xt("modifyBlocks",It),top!==V?(V.editor=new b(e),V.onEditorLoad&&(V.onEditorLoad(V.editor),V.onEditorLoad=null)):V.Squire=b}(document);
\ No newline at end of file
+!function(e,t){"use strict";function n(e,t,n){this.root=this.currentNode=e,this.nodeType=t,this.filter=n}function r(e,t){for(var n=e.length;n--;)if(!t(e[n]))return!1;return!0}function o(e,t,n){if(e.nodeName!==t)return!1;for(var r in n)if(e.getAttribute(r)!==n[r])return!1;return!0}function i(e,t){return e.nodeType===t.nodeType&&e.nodeName===t.nodeName&&e.className===t.className&&(!e.style&&!t.style||e.style.cssText===t.style.cssText)}function a(e){return e.nodeType===L&&!!et[e.nodeName]}function s(e){return J.test(e.nodeName)}function d(e){return e.nodeType===L&&!s(e)&&r(e.childNodes,s)}function l(e){return e.nodeType===L&&!s(e)&&!d(e)}function c(e){var t=e.ownerDocument,r=new n(t.body,x,d,!1);return r.currentNode=e,r}function f(e){return c(e).previousNode()}function h(e){return c(e).nextNode()}function u(e,t,n){do if(o(e,t,n))return e;while(e=e.parentNode);return null}function p(e){var t,n,r,o,i=e.parentNode;return i&&e.nodeType===L?(t=p(i),t+=(t?">":"")+e.nodeName,(n=e.id)&&(t+="#"+n),(r=e.className.trim())&&(o=r.split(/\s\s*/),o.sort(),t+=".",t+=o.join("."))):t=i?p(i):"",t}function m(e){var t=e.nodeType;return t===L?e.childNodes.length:e.length||0}function g(e){var t=e.parentNode;return t&&t.removeChild(e),e}function v(e,t){var n=e.parentNode;n&&n.replaceChild(t,e)}function N(e){for(var t=e.ownerDocument.createDocumentFragment(),n=e.childNodes,r=n?n.length:0;r--;)t.appendChild(e.firstChild);return t}function S(e,n,r,o){var i,a,s,d,l=e.createElement(n);if(r instanceof Array&&(o=r,r=null),r)for(i in r)a=r[i],a!==t&&l.setAttribute(i,r[i]);if(o)for(s=0,d=o.length;d>s;s+=1)l.appendChild(o[s]);return l}function C(e){var t,n,r,o,i=e.ownerDocument,d=e;if("BODY"===e.nodeName&&((n=e.firstChild)&&"BR"!==n.nodeName||(t=i.createElement("DIV"),n?e.replaceChild(t,n):e.appendChild(t),e=t,t=null)),s(e)){for(n=e.firstChild;G&&n&&n.nodeType===R&&!n.data;)e.removeChild(n),n=e.firstChild;if(!n)if(G)for(t=i.createTextNode("​"),r=Nt.length;r--;)o=Nt[r],o._doc===i&&o._didAddZWS();else t=i.createTextNode("")}else if(q){for(;e.nodeType!==R&&!a(e);){if(n=e.firstChild,!n){t=i.createTextNode("");break}e=n}e.nodeType===R?/^ +$/.test(e.data)&&(e.data=""):a(e)&&e.parentNode.insertBefore(i.createTextNode(""),e)}else if(!e.querySelector("BR"))for(t=i.createElement("BR");(n=e.lastElementChild)&&!s(n);)e=n;return t&&e.appendChild(t),d}function _(e){var t,n,r,o,i=e.childNodes,a=e.ownerDocument,d=null;for(t=0,n=i.length;n>t;t+=1)r=i[t],o="BR"===r.nodeName,!o&&s(r)?(d||(d=S(a,"DIV")),d.appendChild(r),t-=1,n-=1):(o||d)&&(d||(d=S(a,"DIV")),C(d),o?e.replaceChild(d,r):(e.insertBefore(d,r),t+=1,n+=1),d=null),l(r)&&_(r);return d&&e.appendChild(C(d)),e}function y(e,t,n){var r,o,i,a=e.nodeType;if(a===R&&e!==n)return y(e.parentNode,e.splitText(t),n);if(a===L){if("number"==typeof t&&(t=t<e.childNodes.length?e.childNodes[t]:null),e===n)return t;for(r=e.parentNode,o=e.cloneNode(!1);t;)i=t.nextSibling,o.appendChild(t),t=i;return C(e),C(o),(i=e.nextSibling)?r.insertBefore(o,i):r.appendChild(o),y(r,o,n)}return t}function E(e,t){if(e.nodeType===L)for(var n,r,o,a=e.childNodes,d=a.length,l=[];d--;)if(n=a[d],r=d&&a[d-1],d&&s(n)&&i(n,r)&&!et[n.nodeName])t.startContainer===n&&(t.startContainer=r,t.startOffset+=m(r)),t.endContainer===n&&(t.endContainer=r,t.endOffset+=m(r)),t.startContainer===e&&(t.startOffset>d?t.startOffset-=1:t.startOffset===d&&(t.startContainer=r,t.startOffset=m(r))),t.endContainer===e&&(t.endOffset>d?t.endOffset-=1:t.endOffset===d&&(t.endContainer=r,t.endOffset=m(r))),g(n),n.nodeType===R?r.appendData(n.data):l.push(N(n));else if(n.nodeType===L){for(o=l.length;o--;)n.appendChild(l.pop());E(n,t)}}function T(e,t,n){for(var r,o,i,a=t;1===a.parentNode.childNodes.length;)a=a.parentNode;g(a),o=e.childNodes.length,r=e.lastChild,r&&"BR"===r.nodeName&&(e.removeChild(r),o-=1),i={startContainer:e,startOffset:o,endContainer:e,endOffset:o},e.appendChild(N(t)),E(e,i),n.setStart(i.startContainer,i.startOffset),n.collapse(!0),K&&(r=e.lastChild)&&"BR"===r.nodeName&&e.removeChild(r)}function B(e){var t,n,r=e.previousSibling,o=e.firstChild,a=e.ownerDocument,s="LI"===e.nodeName;if(!s||o&&/^[OU]L$/.test(o.nodeName))if(r&&i(r,e)){if(!l(r)){if(!s)return;n=a.createElement("DIV"),n.appendChild(N(r)),r.appendChild(n)}g(e),t=!l(e),r.appendChild(N(e)),t&&_(r),o&&B(o)}else s&&(r=a.createElement("DIV"),e.insertBefore(r,o),C(r))}function k(e){var n=e.defaultView,r=e.body;this._win=n,this._doc=e,this._body=r,this._events={},this._lastSelection=null,Q&&this.addEventListener("beforedeactivate",this.getSelection),this._hasZWS=!1,this._lastAnchorNode=null,this._lastFocusNode=null,this._path="",this.addEventListener("keyup",this._updatePathOnEvent),this.addEventListener("mouseup",this._updatePathOnEvent),n.addEventListener("focus",this,!1),n.addEventListener("blur",this,!1),this._undoIndex=-1,this._undoStack=[],this._undoStackLength=0,this._isInUndoState=!1,this.defaultBlockProperties=t,this.addEventListener("keyup",this._docWasChanged),this._awaitingPaste=!1,this.addEventListener(W?"beforecut":"cut",this._onCut),this.addEventListener(W?"beforepaste":"paste",this._onPaste),M&&this.addEventListener("keyup",this._ieSelAllClean),this.addEventListener(K?"keypress":"keydown",this._onKey),$(e)&&(n.Text.prototype.splitText=function(e){var t=this.ownerDocument.createTextNode(this.data.slice(e)),n=this.nextSibling,r=this.parentNode,o=this.length-e;return n?r.insertBefore(t,n):r.appendChild(t),o&&this.deleteData(e,o),t}),r.setAttribute("contenteditable","true"),this.setHTML("");try{e.execCommand("enableObjectResizing",!1,"false"),e.execCommand("enableInlineTableEditing",!1,"false")}catch(o){}Nt.push(this)}var b=2,L=1,R=3,x=1,A=4,D=0,O=1,I=2,P=3,U=e.defaultView,w=navigator.userAgent,F=/iP(?:ad|hone|od)/.test(w),V=/Mac OS X/.test(w),H=/Gecko\//.test(w),W=/Trident\/[456]\./.test(w),M=8===U.ie,K=!!U.opera,z=/WebKit\//.test(w),Z=V?"meta-":"ctrl-",q=W||K,G=W||z,Q=W,$=function(e){var t=e.createElement("DIV"),n=e.createTextNode("12");return t.appendChild(n),n.splitText(2),2!==t.childNodes.length},Y=/[^ \t\r\n]/,j=Array.prototype.indexOf,X={1:1,2:2,3:4,8:128,9:256,11:1024};n.prototype.nextNode=function(){for(var e,t=this.currentNode,n=this.root,r=this.nodeType,o=this.filter;;){for(e=t.firstChild;!e&&t&&t!==n;)e=t.nextSibling,e||(t=t.parentNode);if(!e)return null;if(X[e.nodeType]&r&&o(e))return this.currentNode=e,e;t=e}},n.prototype.previousNode=function(){for(var e,t=this.currentNode,n=this.root,r=this.nodeType,o=this.filter;;){if(t===n)return null;if(e=t.previousSibling)for(;t=e.lastChild;)e=t;else e=t.parentNode;if(!e)return null;if(X[e.nodeType]&r&&o(e))return this.currentNode=e,e;t=e}};var J=/^(?:#text|A(?:BBR|CRONYM)?|B(?:R|D[IO])?|C(?:ITE|ODE)|D(?:ATA|FN|EL)|EM|FONT|HR|I(?:NPUT|MG|NS)?|KBD|Q|R(?:P|T|UBY)|S(?:U[BP]|PAN|TR(?:IKE|ONG)|MALL|AMP)?|U|VAR|WBR)$/,et={BR:1,IMG:1,INPUT:1},tt=function(e,t){for(var n=e.childNodes;t&&e.nodeType===L;)e=n[t-1],n=e.childNodes,t=n.length;return e},nt=function(e,t){if(e.nodeType===L){var n=e.childNodes;if(t<n.length)e=n[t];else{for(;e&&!e.nextSibling;)e=e.parentNode;e&&(e=e.nextSibling)}}return e},rt=function(e,t){e=e.cloneRange(),ct(e);for(var r=e.startContainer,o=e.endContainer,i=e.commonAncestorContainer,a=new n(i,A,function(){return!0},!1),s=a.currentNode=r;!t(s,e)&&s!==o&&(s=a.nextNode()););},ot=function(e){var t="";return rt(e,function(e,n){var r=e.data;r&&/\S/.test(r)&&(e===n.endContainer&&(r=r.slice(0,n.endOffset)),e===n.startContainer&&(r=r.slice(n.startOffset)),t+=r)}),t},it=function(e,t){var n,r,o,i,a=e.startContainer,s=e.startOffset,d=e.endContainer,l=e.endOffset;a.nodeType===R?(n=a.parentNode,r=n.childNodes,s===a.length?(s=j.call(r,a)+1,e.collapsed&&(d=n,l=s)):(s&&(i=a.splitText(s),d===a?(l-=s,d=i):d===n&&(l+=1),a=i),s=j.call(r,a)),a=n):r=a.childNodes,o=r.length,s===o?a.appendChild(t):a.insertBefore(t,r[s]),a===d&&(l+=r.length-o),e.setStart(a,s),e.setEnd(d,l)},at=function(e,t){var n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset;t||(t=e.commonAncestorContainer),t.nodeType===R&&(t=t.parentNode);for(var a,s=y(o,i,t),d=y(n,r,t),l=t.ownerDocument.createDocumentFragment();d!==s;)a=d.nextSibling,l.appendChild(d),d=a;return e.setStart(t,s?j.call(t.childNodes,s):t.childNodes.length),e.collapse(!0),C(t),l},st=function(e){ft(e),at(e);var t=ht(e),n=ut(e);t&&n&&t!==n&&T(t,n,e),t&&C(t);var r=e.endContainer.ownerDocument.body,o=r.firstChild;o&&"BR"!==o.nodeName||(C(r),e.selectNodeContents(r.firstChild));var i=e.collapsed;ct(e),i&&e.collapse(!0)},dt=function(e,t){for(var n=!0,r=t.childNodes,o=r.length;o--;)if(!s(r[o])){n=!1;break}if(e.collapsed||st(e),ct(e),n)it(e,t),e.collapse(!1);else{for(var i,a,d=y(e.startContainer,e.startOffset,e.startContainer.ownerDocument.body),l=d.previousSibling,c=l,f=c.childNodes.length,u=d,p=0,g=d.parentNode;(i=c.lastChild)&&i.nodeType===L&&"BR"!==i.nodeName;)c=i,f=c.childNodes.length;for(;(i=u.firstChild)&&i.nodeType===L&&"BR"!==i.nodeName;)u=i;for(;(i=t.firstChild)&&s(i);)c.appendChild(i);for(;(i=t.lastChild)&&s(i);)u.insertBefore(i,u.firstChild),p+=1;for(a=t;a=h(a);)C(a);g.insertBefore(t,d),a=d.previousSibling,d.textContent?B(d):g.removeChild(d),d.parentNode||(u=a,p=m(u)),l.textContent?B(l):(c=l.nextSibling,f=0,g.removeChild(l)),e.setStart(c,f),e.setEnd(u,p),ct(e)}},lt=function(e,t,n){var r=t.ownerDocument.createRange();if(r.selectNode(t),n){var o=e.compareBoundaryPoints(P,r)>-1,i=e.compareBoundaryPoints(O,r)<1;return!o&&!i}var a=e.compareBoundaryPoints(D,r)<1,s=e.compareBoundaryPoints(I,r)>-1;return a&&s},ct=function(e){for(var t,n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset;n.nodeType!==R&&(t=n.childNodes[r],t&&!a(t));)n=t,r=0;if(i)for(;o.nodeType!==R&&(t=o.childNodes[i-1],t&&!a(t));)o=t,i=m(o);else for(;o.nodeType!==R&&(t=o.firstChild,t&&!a(t));)o=t;e.collapsed?(e.setStart(o,i),e.setEnd(n,r)):(e.setStart(n,r),e.setEnd(o,i))},ft=function(e,t){var n,r=e.startContainer,o=e.startOffset,i=e.endContainer,a=e.endOffset;for(t||(t=e.commonAncestorContainer);r!==t&&!o;)n=r.parentNode,o=j.call(n.childNodes,r),r=n;for(;i!==t&&a===m(i);)n=i.parentNode,a=j.call(n.childNodes,i)+1,i=n;e.setStart(r,o),e.setEnd(i,a)},ht=function(e){var t,n=e.startContainer;return s(n)?t=f(n):d(n)?t=n:(t=tt(n,e.startOffset),t=h(t)),t&&lt(e,t,!0)?t:null},ut=function(e){var t,n,r=e.endContainer;if(s(r))t=f(r);else if(d(r))t=r;else{if(t=nt(r,e.endOffset),!t)for(t=r.ownerDocument.body;n=t.lastChild;)t=n;t=f(t)}return t&&lt(e,t,!0)?t:null},pt=new n(null,A|x,function(e){return e.nodeType===R?Y.test(e.data):"IMG"===e.nodeName}),mt=function(e){var t=e.startContainer,n=e.startOffset;if(t.nodeType===R){if(n)return!1;pt.currentNode=t}else pt.currentNode=nt(t,n);return pt.root=ht(e),!pt.previousNode()},gt=function(e){var t,n=e.endContainer,r=e.endOffset;if(n.nodeType===R){if(t=n.data.length,t&&t>r)return!1;pt.currentNode=n}else pt.currentNode=tt(n,r);return pt.root=ut(e),!pt.nextNode()},vt=function(e){var t,n=ht(e),r=ut(e);n&&r&&(t=n.parentNode,e.setStart(t,j.call(t.childNodes,n)),t=r.parentNode,e.setEnd(t,j.call(t.childNodes,r)+1))},Nt=[],St=k.prototype;St.createElement=function(e,t,n){return S(this._doc,e,t,n)},St.createDefaultBlock=function(e){return C(this.createElement("DIV",this.defaultBlockProperties,e))},St.didError=function(e){console.log(e)},St.getDocument=function(){return this._doc};var Ct={focus:1,blur:1,pathChange:1,select:1,input:1,undoStateChange:1};St.fireEvent=function(e,t){var n,r,o,i=this._events[e];if(i)for(t||(t={}),t.type!==e&&(t.type=e),i=i.slice(),n=0,r=i.length;r>n;n+=1){o=i[n];try{o.handleEvent?o.handleEvent(t):o.call(this,t)}catch(a){a.details="Squire: fireEvent error. Event type: "+e,this.didError(a)}}return this},St.destroy=function(){var e,t=this._win,n=this._doc,r=this._events;t.removeEventListener("focus",this,!1),t.removeEventListener("blur",this,!1);for(e in r)Ct[e]||n.removeEventListener(e,this,!0);for(var o=Nt.length;o--;)Nt[o]===this&&Nt.splice(o,1)},St.handleEvent=function(e){this.fireEvent(e.type,e)},St.addEventListener=function(e,t){var n=this._events[e];return t?(n||(n=this._events[e]=[],Ct[e]||this._doc.addEventListener(e,this,!0)),n.push(t),this):(this.didError({name:"Squire: addEventListener with null or undefined fn",message:"Event type: "+e}),this)},St.removeEventListener=function(e,t){var n,r=this._events[e];if(r){for(n=r.length;n--;)r[n]===t&&r.splice(n,1);r.length||(delete this._events[e],Ct[e]||this._doc.removeEventListener(e,this,!1))}return this},St._createRange=function(e,t,n,r){if(e instanceof this._win.Range)return e.cloneRange();var o=this._doc.createRange();return o.setStart(e,t),n?o.setEnd(n,r):o.setEnd(e,t),o},St.setSelection=function(e){if(e){F&&this._win.focus();var t=this._win.getSelection();t.removeAllRanges(),t.addRange(e)}return this},St.getSelection=function(){var e,t,n,r=this._win.getSelection();if(r.rangeCount){e=r.getRangeAt(0).cloneRange(),t=e.startContainer,n=e.endContainer;try{t&&a(t)&&e.setStartBefore(t),n&&a(n)&&e.setEndBefore(n)}catch(o){this.didError({name:"Squire#getSelection error",message:"Starts: "+t.nodeName+"\nEnds: "+n.nodeName})}this._lastSelection=e}else e=this._lastSelection;return e||(e=this._createRange(this._body.firstChild,0)),e},St.getSelectedText=function(){return ot(this.getSelection())},St.getPath=function(){return this._path},St._didAddZWS=function(){this._hasZWS=!0},St._removeZWS=function(){if(this._hasZWS){for(var e,t,r=new n(this._body,A,function(){return!0},!1);e=r.nextNode();)for(;(t=e.data.indexOf("​"))>-1;)e.deleteData(t,1);this._hasZWS=!1}},St._updatePath=function(e,t){var n,r=e.startContainer,o=e.endContainer;(t||r!==this._lastAnchorNode||o!==this._lastFocusNode)&&(this._lastAnchorNode=r,this._lastFocusNode=o,n=r&&o?r===o?p(o):"(selection)":"",this._path!==n&&(this._path=n,this.fireEvent("pathChange",{path:n}))),r!==o&&this.fireEvent("select")},St._updatePathOnEvent=function(){this._updatePath(this.getSelection())},St.focus=function(){return this._body.focus(),this._win.focus(),this},St.blur=function(){return H&&this._body.blur(),top.focus(),this};var _t="squire-selection-start",yt="squire-selection-end";St._saveRangeToBookmark=function(e){var t,n=this.createElement("INPUT",{id:_t,type:"hidden"}),r=this.createElement("INPUT",{id:yt,type:"hidden"});it(e,n),e.collapse(!1),it(e,r),n.compareDocumentPosition(r)&b&&(n.id=yt,r.id=_t,t=n,n=r,r=t),e.setStartAfter(n),e.setEndBefore(r)},St._getRangeAndRemoveBookmark=function(e){var t=this._doc,n=t.getElementById(_t),r=t.getElementById(yt);if(n&&r){var o,i=n.parentNode,a=r.parentNode,s={startContainer:i,endContainer:a,startOffset:j.call(i.childNodes,n),endOffset:j.call(a.childNodes,r)};i===a&&(s.endOffset-=1),g(n),g(r),E(i,s),i!==a&&E(a,s),e||(e=t.createRange()),e.setStart(s.startContainer,s.startOffset),e.setEnd(s.endContainer,s.endOffset),o=e.collapsed,ct(e),o&&e.collapse(!0)}return e||null},St._docWasChanged=function(e){var t=e&&e.keyCode;(!e||!e.ctrlKey&&!e.metaKey&&!e.altKey&&(16>t||t>20)&&(33>t||t>45))&&(this._isInUndoState&&(this._isInUndoState=!1,this.fireEvent("undoStateChange",{canUndo:!0,canRedo:!1})),this.fireEvent("input"))},St._recordUndoState=function(e){if(!this._isInUndoState){var t=this._undoIndex+=1,n=this._undoStack;t<this._undoStackLength&&(n.length=this._undoStackLength=t),e&&this._saveRangeToBookmark(e),n[t]=this._getHTML(),this._undoStackLength+=1,this._isInUndoState=!0}},St.undo=function(){if(0!==this._undoIndex||!this._isInUndoState){this._recordUndoState(this.getSelection()),this._undoIndex-=1,this._setHTML(this._undoStack[this._undoIndex]);var e=this._getRangeAndRemoveBookmark();e&&this.setSelection(e),this._isInUndoState=!0,this.fireEvent("undoStateChange",{canUndo:0!==this._undoIndex,canRedo:!0}),this.fireEvent("input")}return this},St.redo=function(){var e=this._undoIndex,t=this._undoStackLength;if(t>e+1&&this._isInUndoState){this._undoIndex+=1,this._setHTML(this._undoStack[this._undoIndex]);var n=this._getRangeAndRemoveBookmark();n&&this.setSelection(n),this.fireEvent("undoStateChange",{canUndo:!0,canRedo:t>e+2}),this.fireEvent("input")}return this},St.hasFormat=function(e,t,r){if(e=e.toUpperCase(),t||(t={}),!r&&!(r=this.getSelection()))return!1;var o,i,a=r.commonAncestorContainer;if(u(a,e,t))return!0;if(a.nodeType===R)return!1;o=new n(a,A,function(e){return lt(r,e,!0)},!1);for(var s=!1;i=o.nextNode();){if(!u(i,e,t))return!1;s=!0}return s},St._addFormat=function(e,t,r){var o,i,a,s,d,l,c,f;if(r.collapsed)o=C(this.createElement(e,t)),it(r,o),r.setStart(o.firstChild,o.firstChild.length),r.collapse(!0);else{i=new n(r.commonAncestorContainer,A,function(e){return lt(r,e,!0)},!1),a=r.startContainer,d=r.startOffset,s=r.endContainer,l=r.endOffset,i.currentNode=a,a.nodeType!==R&&(a=i.nextNode(),d=0);do c=i.currentNode,f=!u(c,e,t),f&&(c===s&&c.length>l&&c.splitText(l),c===a&&d&&(c=c.splitText(d),s===a&&(s=c,l-=d),a=c,d=0),o=this.createElement(e,t),v(c,o),o.appendChild(c));while(i.nextNode());s.nodeType!==R&&(s=c,l=c.length),r=this._createRange(a,d,s,l)}return r},St._removeFormat=function(e,t,n,r){this._saveRangeToBookmark(n);var i,a=this._doc;n.collapsed&&(G?(i=a.createTextNode("​"),this._didAddZWS()):i=a.createTextNode(""),it(n,i));for(var d=n.commonAncestorContainer;s(d);)d=d.parentNode;var l=n.startContainer,c=n.startOffset,f=n.endContainer,h=n.endOffset,u=[],p=function(e,t){if(!lt(n,e,!1)){var r,o,i=e.nodeType===R;if(!lt(n,e,!0))return void("INPUT"===e.nodeName||i&&!e.data||u.push([t,e]));if(i)e===f&&h!==e.length&&u.push([t,e.splitText(h)]),e===l&&c&&(e.splitText(c),u.push([t,e]));else for(r=e.firstChild;r;r=o)o=r.nextSibling,p(r,t)}},m=Array.prototype.filter.call(d.getElementsByTagName(e),function(r){return lt(n,r,!0)&&o(r,e,t)});r||m.forEach(function(e){p(e,e)}),u.forEach(function(e){var t=e[0].cloneNode(!1),n=e[1];v(n,t),t.appendChild(n)}),m.forEach(function(e){v(e,N(e))}),this._getRangeAndRemoveBookmark(n),i&&n.collapse(!1);var g={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset};return E(d,g),n.setStart(g.startContainer,g.startOffset),n.setEnd(g.endContainer,g.endOffset),n},St.changeFormat=function(e,t,n,r){return n||(n=this.getSelection())?(this._recordUndoState(n),this._getRangeAndRemoveBookmark(n),t&&(n=this._removeFormat(t.tag.toUpperCase(),t.attributes||{},n,r)),e&&(n=this._addFormat(e.tag.toUpperCase(),e.attributes||{},n)),this.setSelection(n),this._updatePath(n,!0),this._docWasChanged(),this):void 0};var Et={DIV:"DIV",PRE:"DIV",H1:"DIV",H2:"DIV",H3:"DIV",H4:"DIV",H5:"DIV",H6:"DIV",P:"DIV",DT:"DD",DD:"DT",LI:"LI"},Tt=function(e,t,n){var r=Et[e.nodeName],o=y(t,n,e.parentNode);return o.nodeName!==r&&(e=S(o.ownerDocument,r),e.className="rtl"===o.dir?"dir-rtl":"",e.dir=o.dir,v(o,e),e.appendChild(N(o)),o=e),o};St.forEachBlock=function(e,t,n){if(!n&&!(n=this.getSelection()))return this;t&&(this._recordUndoState(n),this._getRangeAndRemoveBookmark(n));var r=ht(n),o=ut(n);if(r&&o)do if(e(r)||r===o)break;while(r=h(r));return t&&(this.setSelection(n),this._updatePath(n,!0),this._docWasChanged()),this},St.modifyBlocks=function(e,t){if(!t&&!(t=this.getSelection()))return this;this._isInUndoState?this._saveRangeToBookmark(t):this._recordUndoState(t),vt(t);var n,r=this._body;return ft(t,r),n=at(t,r),it(t,e.call(this,n)),t.endOffset<t.endContainer.childNodes.length&&B(t.endContainer.childNodes[t.endOffset]),B(t.startContainer.childNodes[t.startOffset]),this._getRangeAndRemoveBookmark(t),this.setSelection(t),this._updatePath(t,!0),this._docWasChanged(),this};var Bt=function(e){return this.createElement("BLOCKQUOTE",[e])},kt=function(e){var t=e.querySelectorAll("blockquote");return Array.prototype.filter.call(t,function(e){return!u(e.parentNode,"BLOCKQUOTE")}).forEach(function(e){v(e,N(e))}),e},bt=function(){return this.createDefaultBlock([this.createElement("INPUT",{id:_t,type:"hidden"}),this.createElement("INPUT",{id:yt,type:"hidden"})])},Lt=function(e,n,r){for(var o,i,a,s,d=c(n);o=d.nextNode();)i=o.parentNode.nodeName,"LI"!==i?(s=e.createElement("LI",{"class":"rtl"===o.dir?"dir-rtl":t,dir:o.dir||t}),(a=o.previousSibling)&&a.nodeName===r?a.appendChild(s):v(o,e.createElement(r,[s])),s.appendChild(o)):(o=o.parentNode.parentNode,i=o.nodeName,i!==r&&/^[OU]L$/.test(i)&&v(o,e.createElement(r,[N(o)])))},Rt=function(e){return Lt(this,e,"UL"),e},xt=function(e){return Lt(this,e,"OL"),e},At=function(e){var t,n,r,o,i,a,s,d=e.querySelectorAll("UL, OL");for(t=0,n=d.length;n>t;t+=1){for(o=d[t],i=N(o),a=i.childNodes,r=a.length;r--;)s=a[r],v(s,N(s));_(i),v(o,i)}return e},Dt=function(e){var t,n,r,o,i,a=e.querySelectorAll("LI");for(t=0,n=a.length;n>t;t+=1)r=a[t],l(r.firstChild)||(o=r.parentNode.nodeName,i=r.previousSibling,i&&(i=i.lastChild)&&i.nodeName===o||v(r,this.createElement("LI",[i=this.createElement(o)])),i.appendChild(r));return e},Ot=function(e){var t=e.querySelectorAll("LI");return Array.prototype.filter.call(t,function(e){return!l(e.firstChild)}).forEach(function(t){var n,r=t.parentNode,o=r.parentNode,i=t.firstChild,a=i;for(t.previousSibling&&(r=y(r,t,o));a&&(n=a.nextSibling,!l(a));)o.insertBefore(a,r),a=n;for("LI"===o.nodeName&&i.previousSibling&&y(o,i,o.parentNode);t!==e&&!t.childNodes.length;)r=t.parentNode,r.removeChild(t),t=r},this),_(e),e},It=/\b((?:(?:ht|f)tps?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,}\/)(?:[^\s()<>]+|\([^\s()<>]+\))+(?:\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))|([\w\-.%+]+@(?:[\w\-]+\.)+[A-Z]{2,}\b)/i,Pt=function(e){for(var t,r,o,i,a,s,d,l=e.ownerDocument,c=new n(e,A,function(e){return!u(e,"A")},!1);t=c.nextNode();)for(r=t.data,o=t.parentNode;i=It.exec(r);)a=i.index,s=a+i[0].length,a&&(d=l.createTextNode(r.slice(0,a)),o.insertBefore(d,t)),d=l.createElement("A"),d.textContent=r.slice(a,s),d.href=i[1]?/^(?:ht|f)tps?:/.test(i[1])?i[1]:"http://"+i[1]:"mailto:"+i[2],o.insertBefore(d,t),t.data=r=r.slice(s)},Ut=/^(?:A(?:DDRESS|RTICLE|SIDE)|BLOCKQUOTE|CAPTION|D(?:[DLT]|IV)|F(?:IGURE|OOTER)|H[1-6]|HEADER|L(?:ABEL|EGEND|I)|O(?:L|UTPUT)|P(?:RE)?|SECTION|T(?:ABLE|BODY|D|FOOT|H|HEAD|R)|UL)$/,wt={1:10,2:13,3:16,4:18,5:24,6:32,7:48},Ft={backgroundColor:{regexp:Y,replace:function(e,t){return S(e,"SPAN",{"class":"highlight",style:"background-color: "+t})}},color:{regexp:Y,replace:function(e,t){return S(e,"SPAN",{"class":"colour",style:"color:"+t})}},fontWeight:{regexp:/^bold/i,replace:function(e){return S(e,"B")}},fontStyle:{regexp:/^italic/i,replace:function(e){return S(e,"I")}},fontFamily:{regexp:Y,replace:function(e,t){return S(e,"SPAN",{"class":"font",style:"font-family:"+t})}},fontSize:{regexp:Y,replace:function(e,t){return S(e,"SPAN",{"class":"size",style:"font-size:"+t})}}},Vt=function(e){return function(t,n){var r=S(t.ownerDocument,e);return n.replaceChild(r,t),r.appendChild(N(t)),r}},Ht={SPAN:function(e,t){var n,r,o,i,a,s,d=e.style,l=e.ownerDocument;for(n in Ft)r=Ft[n],o=d[n],o&&r.regexp.test(o)&&(s=r.replace(l,o),i&&i.appendChild(s),i=s,a||(a=s));return a&&(i.appendChild(N(e)),t.replaceChild(a,e)),i||e},STRONG:Vt("B"),EM:Vt("I"),STRIKE:Vt("S"),FONT:function(e,t){var n,r,o,i,a,s=e.face,d=e.size,l=e.color,c=e.ownerDocument;return s&&(n=S(c,"SPAN",{"class":"font",style:"font-family:"+s}),a=n,i=n),d&&(r=S(c,"SPAN",{"class":"size",style:"font-size:"+wt[d]+"px"}),a||(a=r),i&&i.appendChild(r),i=r),l&&/^#?([\dA-F]{3}){1,2}$/i.test(l)&&("#"!==l.charAt(0)&&(l="#"+l),o=S(c,"SPAN",{"class":"colour",style:"color:"+l}),a||(a=o),i&&i.appendChild(o),i=o),a||(a=i=S(c,"SPAN")),t.replaceChild(a,e),i.appendChild(N(e)),i},TT:function(e,t){var n=S(e.ownerDocument,"SPAN",{"class":"font",style:'font-family:menlo,consolas,"courier new",monospace'});return t.replaceChild(n,e),n.appendChild(N(e)),n}},Wt=function(e){for(var t,n=e.childNodes,r=n.length;r--;)t=n[r],t.nodeType===L&&"IMG"!==t.nodeName&&(Wt(t),s(t)&&!t.firstChild&&e.removeChild(t))},Mt=function(e,t){var n,r,o,i,a,d,l,c,f,h,u=e.childNodes;for(n=0,r=u.length;r>n;n+=1)if(o=u[n],i=o.nodeName,a=o.nodeType,d=Ht[i],a===L){if(l=o.childNodes.length,d)o=d(o,e);else{if(!Ut.test(i)&&!s(o)){n-=1,r+=l-1,e.replaceChild(N(o),o);continue}!t&&o.style.cssText&&o.removeAttribute("style")}l&&Mt(o,t)}else{if(a===R){if(c=o.data,/\S/.test(c)){if(s(e))continue;if(f=0,h=c.length,!n||!s(u[n-1])){for(;h>f&&!Y.test(c.charAt(f));)f+=1;f&&(o.data=c=c.slice(f),h-=f)}if(n+1===r||!s(u[n+1])){for(f=h;f>0&&!Y.test(c.charAt(f-1));)f-=1;h>f&&(o.data=c.slice(0,f))}continue}if(n&&r>n+1&&s(u[n-1])&&s(u[n+1])){o.data=" ";continue}}e.removeChild(o),n-=1,r-=1}return e},Kt=function(e){return e.nodeType===L?"BR"===e.nodeName:Y.test(e.data)},zt=function(e){for(var t,r=e.parentNode;s(r);)r=r.parentNode;return t=new n(r,x|A,Kt),t.currentNode=e,!!t.nextNode()},Zt=function(e){var t,n,r,o=e.querySelectorAll("BR"),i=[],a=o.length;for(t=0;a>t;t+=1)i[t]=zt(o[t]);for(;a--;)if(n=o[a],r=n.parentNode){for(;s(r);)r=r.parentNode;if(d(r)){if(i[a]){if("DIV"!==r.nodeName)continue;y(n.parentNode,n,r.parentNode)}g(n)}else _(r)}};St._ensureBottomLine=function(){var e=this._body,t=e.lastChild;t&&"DIV"===t.nodeName&&d(t)||e.appendChild(this.createDefaultBlock())},St._onCut=function(){var e=this.getSelection(),t=this;this._recordUndoState(e),this._getRangeAndRemoveBookmark(e),this.setSelection(e),setTimeout(function(){try{t._ensureBottomLine()}catch(e){t.didError(e)}},0)},St._onPaste=function(e){if(!this._awaitingPaste){var t,n,r=e.clipboardData,o=r&&r.items,i=!1,a=!1;if(o){for(t=o.length;t--;){if(n=o[t].type,"text/html"===n){a=!1;break}/^image\/.*/.test(n)&&(a=!0)}if(a)return e.preventDefault(),this.fireEvent("dragover",{dataTransfer:r,preventDefault:function(){i=!0}}),void(i&&this.fireEvent("drop",{dataTransfer:r}))}this._awaitingPaste=!0;var s=this,d=this._body,l=this.getSelection(),c=l.startContainer,f=l.startOffset,u=l.endContainer,p=l.endOffset,m=ht(l);s._recordUndoState(l),s._getRangeAndRemoveBookmark(l);var v=this.createElement("DIV",{style:"position: absolute; overflow: hidden; top:"+(d.scrollTop+(m?m.getBoundingClientRect().top:0))+"px; left: 0; width: 1px; height: 1px;"});d.appendChild(v),l.selectNodeContents(v),this.setSelection(l),setTimeout(function(){try{var e=N(g(v)),t=e.firstChild,n=s._createRange(c,f,u,p);if(t){t===e.lastChild&&"DIV"===t.nodeName&&e.replaceChild(N(t),t),e.normalize(),Pt(e),Mt(e,!1),Zt(e),Wt(e);for(var r=e,o=!0;r=h(r);)C(r);s.fireEvent("willPaste",{fragment:e,preventDefault:function(){o=!1}}),o&&(dt(n,e),s._docWasChanged(),n.collapse(!1),s._ensureBottomLine())}s.setSelection(n),s._updatePath(n,!0),s._awaitingPaste=!1}catch(i){s.didError(i)}},0)}};var qt={8:"backspace",9:"tab",13:"enter",32:"space",37:"left",39:"right",46:"delete",219:"[",221:"]"},Gt=function(e){return function(t,n){n.preventDefault(),t[e]()}},Qt=function(e,t){return t=t||null,function(n,r){r.preventDefault();var o=n.getSelection();n.hasFormat(e,null,o)?n.changeFormat(null,{tag:e},o):n.changeFormat({tag:e},t,o)}},$t=function(e){try{var t,n=e.getSelection(),r=n.startContainer;if(r.nodeType===R&&(r=r.parentNode),s(r)&&!r.textContent){do t=r.parentNode;while(s(t)&&!t.textContent&&(r=t));n.setStart(t,j.call(t.childNodes,r)),n.collapse(!0),t.removeChild(r),d(t)||(t=f(t)),C(t),ct(n),e.setSelection(n),e._updatePath(n)}e._ensureBottomLine()}catch(o){e.didError(o)}};M&&(St._ieSelAllClean=function(){var e=this._body.firstChild;"P"===e.nodeName&&(this._saveRangeToBookmark(this.getSelection()),v(e,this.createDefaultBlock([N(e)])),this.setSelection(this._getRangeAndRemoveBookmark()))});var Yt={enter:function(e,t){t.preventDefault();var n,r,o,i,a,s=e.getSelection();if(s){if(e._recordUndoState(s),Pt(s.startContainer),e._removeZWS(),e._getRangeAndRemoveBookmark(s),s.collapsed||st(s),n=ht(s),n&&(r=u(n,"LI"))&&(n=r),o=n?n.nodeName:"DIV",i=Et[o],!n)return it(s,e.createElement("BR")),s.collapse(!1),e.setSelection(s),e._updatePath(s,!0),void e._docWasChanged();var d,l=s.startContainer,c=s.startOffset;if(i||(l===n&&(l=c?l.childNodes[c-1]:null,c=0,l&&("BR"===l.nodeName?l=l.nextSibling:c=m(l),l&&"BR"!==l.nodeName||(d=C(e.createElement("DIV")),l?n.replaceChild(d,l):n.appendChild(d),l=d))),_(n),i="DIV",l||(l=n.firstChild),s.setStart(l,c),s.setEnd(l,c),n=ht(s)),!n.textContent){if(u(n,"UL")||u(n,"OL"))return e.modifyBlocks(Ot,s);if(u(n,"BLOCKQUOTE"))return e.modifyBlocks(bt,s)}for(a=Tt(n,l,c);a.nodeType===L;){var f,h=a.firstChild;if("A"!==a.nodeName){for(;h&&h.nodeType===R&&!h.data&&(f=h.nextSibling,f&&"BR"!==f.nodeName);)g(h),h=f;if(!h||"BR"===h.nodeName||h.nodeType===R&&!K)break;a=h}else v(a,N(a)),a=h}s=e._createRange(a,0),e.setSelection(s),e._updatePath(s,!0),a.nodeType===R&&(a=a.parentNode);var p=e._doc,S=e._body;a.offsetTop+a.offsetHeight>(p.documentElement.scrollTop||S.scrollTop)+S.offsetHeight&&a.scrollIntoView(!1),e._docWasChanged()}},backspace:function(e,t){e._removeZWS();var n=e.getSelection();if(e._recordUndoState(n),e._getRangeAndRemoveBookmark(n),n.collapsed)if(mt(n)){t.preventDefault();var r=ht(n),o=r&&f(r);if(o){if(!o.isContentEditable)return void g(o);for(T(o,r,n),r=o.parentNode;r&&!r.nextSibling;)r=r.parentNode;r&&(r=r.nextSibling)&&B(r),e.setSelection(n)}else if(r){if(u(r,"UL")||u(r,"OL"))return e.modifyBlocks(Ot,n);if(u(r,"BLOCKQUOTE"))return e.modifyBlocks(kt,n);e.setSelection(n),e._updatePath(n,!0)}}else e.setSelection(n),setTimeout(function(){$t(e)},0);else t.preventDefault(),st(n),e._ensureBottomLine(),e.setSelection(n),e._updatePath(n,!0)},"delete":function(e,t){e._removeZWS();var n=e.getSelection();if(e._recordUndoState(n),e._getRangeAndRemoveBookmark(n),n.collapsed)if(gt(n)){t.preventDefault();var r=ht(n),o=r&&h(r);if(o){if(!o.isContentEditable)return void g(o);for(T(r,o,n),o=r.parentNode;o&&!o.nextSibling;)o=o.parentNode;o&&(o=o.nextSibling)&&B(o),e.setSelection(n),e._updatePath(n,!0)}}else e.setSelection(n),setTimeout(function(){$t(e)},0);else t.preventDefault(),st(n),e._ensureBottomLine(),e.setSelection(n),e._updatePath(n,!0)},tab:function(e,t){e._removeZWS();var n,r,o=e.getSelection();if(o.collapsed&&mt(o)&&gt(o)){for(n=ht(o);r=n.parentNode;){if("UL"===r.nodeName||"OL"===r.nodeName){n.previousSibling&&(t.preventDefault(),e.modifyBlocks(Dt,o));break}n=r}t.preventDefault()}},space:function(e){var t=e.getSelection();e._recordUndoState(t),Pt(t.startContainer),e._getRangeAndRemoveBookmark(t),e.setSelection(t)},left:function(e){e._removeZWS()},right:function(e){e._removeZWS()}};V&&H&&U.getSelection().modify&&(Yt["meta-left"]=function(e,t){t.preventDefault(),e._win.getSelection().modify("move","backward","lineboundary")},Yt["meta-right"]=function(e,t){t.preventDefault(),e._win.getSelection().modify("move","forward","lineboundary")}),Yt[Z+"b"]=Qt("B"),Yt[Z+"i"]=Qt("I"),Yt[Z+"u"]=Qt("U"),Yt[Z+"shift-7"]=Qt("S"),Yt[Z+"shift-5"]=Qt("SUB",{tag:"SUP"}),Yt[Z+"shift-6"]=Qt("SUP",{tag:"SUB"}),Yt[Z+"shift-8"]=Gt("makeUnorderedList"),Yt[Z+"shift-9"]=Gt("makeOrderedList"),Yt[Z+"["]=Gt("decreaseQuoteLevel"),Yt[Z+"]"]=Gt("increaseQuoteLevel"),Yt[Z+"y"]=Gt("redo"),Yt[Z+"z"]=Gt("undo"),Yt[Z+"shift-z"]=Gt("redo"),St._onKey=function(e){var t=e.keyCode,n=qt[t],r="";n||(n=String.fromCharCode(t).toLowerCase(),/^[A-Za-z0-9]$/.test(n)||(n="")),K&&46===e.which&&(n="."),t>111&&124>t&&(n="f"+(t-111)),"backspace"!==n&&"delete"!==n&&(e.altKey&&(r+="alt-"),e.ctrlKey&&(r+="ctrl-"),e.metaKey&&(r+="meta-")),e.shiftKey&&(r+="shift-"),n=r+n,Yt[n]&&Yt[n](this,e)},St._getHTML=function(){return this._body.innerHTML},St._setHTML=function(e){var t=this._body;t.innerHTML=e;do C(t);while(t=h(t))},St.getHTML=function(e){var t,n,r,o,i,a=[];if(e&&(i=this.getSelection())&&this._saveRangeToBookmark(i),q)for(t=this._body;t=h(t);)t.textContent||t.querySelector("BR")||(n=this.createElement("BR"),t.appendChild(n),a.push(n));if(r=this._getHTML().replace(/\u200B/g,""),q)for(o=a.length;o--;)g(a[o]);return i&&this._getRangeAndRemoveBookmark(i),r},St.setHTML=function(e){var t,n=this._doc.createDocumentFragment(),r=this.createElement("DIV");r.innerHTML=e,n.appendChild(N(r)),Mt(n,!0),Zt(n),_(n);for(var o=n;o=h(o);)C(o);for(var i=this._body;t=i.lastChild;)i.removeChild(t);i.appendChild(n),C(i),this._undoIndex=-1,this._undoStack.length=0,this._undoStackLength=0,this._isInUndoState=!1;var a=this._getRangeAndRemoveBookmark()||this._createRange(i.firstChild,0);
+return this._recordUndoState(a),this._getRangeAndRemoveBookmark(a),Q?this._lastSelection=a:this.setSelection(a),this._updatePath(a,!0),this},St.insertElement=function(e,t){if(t||(t=this.getSelection()),t.collapse(!0),s(e))it(t,e),t.setStartAfter(e);else{for(var n,r,o=this._body,i=ht(t)||o;i!==o&&!i.nextSibling;)i=i.parentNode;i!==o&&(n=i.parentNode,r=y(n,i.nextSibling,o)),r?(o.insertBefore(e,r),t.setStart(r,0),t.setStart(r,0),ct(t)):(o.appendChild(e),o.appendChild(this.createDefaultBlock()),t.setStart(e,0),t.setEnd(e,0)),this.focus(),this.setSelection(t),this._updatePath(t)}return this},St.insertImage=function(e){var t=this.createElement("IMG",{src:e});return this.insertElement(t),t};var jt=function(e,t,n){return function(){return this[e](t,n),this.focus()}};St.addStyles=function(e){if(e){var t=this._doc.documentElement.firstChild,n=this.createElement("STYLE",{type:"text/css"});n.styleSheet?(t.appendChild(n),n.styleSheet.cssText=e):(n.appendChild(this._doc.createTextNode(e)),t.appendChild(n))}return this},St.bold=jt("changeFormat",{tag:"B"}),St.italic=jt("changeFormat",{tag:"I"}),St.underline=jt("changeFormat",{tag:"U"}),St.strikethrough=jt("changeFormat",{tag:"S"}),St.subscript=jt("changeFormat",{tag:"SUB"},{tag:"SUP"}),St.superscript=jt("changeFormat",{tag:"SUP"},{tag:"SUB"}),St.removeBold=jt("changeFormat",null,{tag:"B"}),St.removeItalic=jt("changeFormat",null,{tag:"I"}),St.removeUnderline=jt("changeFormat",null,{tag:"U"}),St.removeStrikethrough=jt("changeFormat",null,{tag:"S"}),St.removeSubscript=jt("changeFormat",null,{tag:"SUB"}),St.removeSuperscript=jt("changeFormat",null,{tag:"SUP"}),St.makeLink=function(e){var t=this.getSelection();if(t.collapsed){var n=e.indexOf(":")+1;if(n)for(;"/"===e[n];)n+=1;it(t,this._doc.createTextNode(e.slice(n)))}return this.changeFormat({tag:"A",attributes:{href:e}},{tag:"A"},t),this.focus()},St.removeLink=function(){return this.changeFormat(null,{tag:"A"},this.getSelection(),!0),this.focus()},St.setFontFace=function(e){return this.changeFormat({tag:"SPAN",attributes:{"class":"font",style:"font-family: "+e+", sans-serif;"}},{tag:"SPAN",attributes:{"class":"font"}}),this.focus()},St.setFontSize=function(e){return this.changeFormat({tag:"SPAN",attributes:{"class":"size",style:"font-size: "+("number"==typeof e?e+"px":e)}},{tag:"SPAN",attributes:{"class":"size"}}),this.focus()},St.setTextColour=function(e){return this.changeFormat({tag:"SPAN",attributes:{"class":"colour",style:"color: "+e}},{tag:"SPAN",attributes:{"class":"colour"}}),this.focus()},St.setHighlightColour=function(e){return this.changeFormat({tag:"SPAN",attributes:{"class":"highlight",style:"background-color: "+e}},{tag:"SPAN",attributes:{"class":"highlight"}}),this.focus()},St.setTextAlignment=function(e){return this.forEachBlock(function(t){t.className=(t.className.split(/\s+/).filter(function(e){return!/align/.test(e)}).join(" ")+" align-"+e).trim(),t.style.textAlign=e},!0),this.focus()},St.setTextDirection=function(e){return this.forEachBlock(function(t){t.className=(t.className.split(/\s+/).filter(function(e){return!/dir/.test(e)}).join(" ")+" dir-"+e).trim(),t.dir=e},!0),this.focus()},St.increaseQuoteLevel=jt("modifyBlocks",Bt),St.decreaseQuoteLevel=jt("modifyBlocks",kt),St.makeUnorderedList=jt("modifyBlocks",Rt),St.makeOrderedList=jt("modifyBlocks",xt),St.removeList=jt("modifyBlocks",At),St.increaseListLevel=jt("modifyBlocks",Dt),St.decreaseListLevel=jt("modifyBlocks",Ot),top!==U?(U.editor=new k(e),U.onEditorLoad&&(U.onEditorLoad(U.editor),U.onEditorLoad=null)):U.Squire=k}(document);
\ No newline at end of file
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..85d5259
--- /dev/null
+++ b/package.json
@@ -0,0 +1,29 @@
+{
+  "name": "Squire",
+  "version": "0.0.1",
+  "description": "Squire is an HTML5 rich text editor, which provides powerful cross-browser normalisation, whilst being supremely lightweight and flexible.",
+  "main": "build/squire.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/neilj/Squire.git"
+  },
+  "keywords": [
+    "wysiwyg",
+    "editor",
+    "text",
+    "html",
+    "squire"
+  ],
+  "author": "Neil Jenkins",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/neilj/Squire/issues"
+  },
+  "homepage": "https://github.com/neilj/Squire",
+  "devDependencies": {
+    "uglify-js": "^2.4.15"
+  }
+}
diff --git a/source/Constants.js b/source/Constants.js
index 7bb1f24..78ca14c 100644
--- a/source/Constants.js
+++ b/source/Constants.js
@@ -1,13 +1,10 @@
-/*global doc, navigator */
-/*jshint strict:false */
+/*jshint strict:false, undef:false, unused:false */
 
 var DOCUMENT_POSITION_PRECEDING = 2; // Node.DOCUMENT_POSITION_PRECEDING
 var ELEMENT_NODE = 1;                // Node.ELEMENT_NODE;
 var TEXT_NODE = 3;                   // Node.TEXT_NODE;
 var SHOW_ELEMENT = 1;                // NodeFilter.SHOW_ELEMENT;
 var SHOW_TEXT = 4;                   // NodeFilter.SHOW_TEXT;
-var FILTER_ACCEPT = 1;               // NodeFilter.FILTER_ACCEPT;
-var FILTER_SKIP = 3;                 // NodeFilter.FILTER_SKIP;
 
 var START_TO_START = 0; // Range.START_TO_START
 var START_TO_END = 1;   // Range.START_TO_END
@@ -24,21 +21,21 @@ var isMac = /Mac OS X/.test( ua );
 var isGecko = /Gecko\//.test( ua );
 var isIE8or9or10 = /Trident\/[456]\./.test( ua );
 var isIE8 = ( win.ie === 8 );
-var isOpera = !!win.opera;
+var isPresto = !!win.opera;
 var isWebKit = /WebKit\//.test( ua );
 
 var ctrlKey = isMac ? 'meta-' : 'ctrl-';
 
-var useTextFixer = isIE8or9or10 || isOpera;
+var useTextFixer = isIE8or9or10 || isPresto;
 var cantFocusEmptyTextNodes = isIE8or9or10 || isWebKit;
 var losesSelectionOnBlur = isIE8or9or10;
-var hasBuggySplit = ( function () {
+var hasBuggySplit = function ( doc ) {
     var div = doc.createElement( 'DIV' ),
         text = doc.createTextNode( '12' );
     div.appendChild( text );
     text.splitText( 2 );
     return div.childNodes.length !== 2;
-}() );
+};
 
 // Use [^ \t\r\n] instead of \S so that nbsp does not count as white-space
 var notWS = /[^ \t\r\n]/;
diff --git a/source/Editor.js b/source/Editor.js
index c0a54d9..811ad8e 100644
--- a/source/Editor.js
+++ b/source/Editor.js
@@ -1,70 +1,6 @@
-/*global
-    DOCUMENT_POSITION_PRECEDING,
-    ELEMENT_NODE,
-    TEXT_NODE,
-    SHOW_ELEMENT,
-    SHOW_TEXT,
-    FILTER_ACCEPT,
-    FILTER_SKIP,
-    win,
-    isIOS,
-    isMac,
-    isGecko,
-    isIE8or9or10,
-    isIE8,
-    isOpera,
-    ctrlKey,
-    useTextFixer,
-    cantFocusEmptyTextNodes,
-    losesSelectionOnBlur,
-    hasBuggySplit,
-    notWS,
-    indexOf,
+/*jshint strict:false, undef:false, unused:false */
 
-    TreeWalker,
-
-    hasTagAttributes,
-    isLeaf,
-    isInline,
-    isBlock,
-    isContainer,
-    getBlockWalker,
-    getPreviousBlock,
-    getNextBlock,
-    getNearest,
-    getPath,
-    getLength,
-    detach,
-    replaceWith,
-    empty,
-    fixCursor,
-    split,
-    mergeInlines,
-    mergeWithBlock,
-    mergeContainers,
-    fixContainer,
-    createElement,
-
-    forEachTextNodeInRange,
-    getTextContentInRange,
-    insertNodeInRange,
-    extractContentsOfRange,
-    deleteContentsOfRange,
-    insertTreeFragmentIntoRange,
-    isNodeContainedInRange,
-    moveRangeBoundariesDownTree,
-    moveRangeBoundariesUpTree,
-    getStartBlockOfRange,
-    getEndBlockOfRange,
-    rangeDoesStartAtBlockBoundary,
-    rangeDoesEndAtBlockBoundary,
-    expandRangeToBlockBoundaries,
-
-    top,
-    console,
-    setTimeout
-*/
-/*jshint strict:false */
+var instances = [];
 
 function Squire ( doc ) {
     var win = doc.defaultView;
@@ -114,7 +50,7 @@ function Squire ( doc ) {
         this.addEventListener( 'keyup', this._ieSelAllClean );
     }
     // Opera does not fire keydown repeatedly.
-    this.addEventListener( isOpera ? 'keypress' : 'keydown', this._onKey );
+    this.addEventListener( isPresto ? 'keypress' : 'keydown', this._onKey );
 
     // Fix IE8/9's buggy implementation of Text#splitText.
     // If the split is at the end of the node, it doesn't insert the newly split
@@ -122,7 +58,7 @@ function Squire ( doc ) {
     // And even if the split is not at the end, the original node is removed
     // from the document and replaced by another, rather than just having its
     // data shortened.
-    if ( hasBuggySplit ) {
+    if ( hasBuggySplit( doc ) ) {
         win.Text.prototype.splitText = function ( offset ) {
             var afterSplit = this.ownerDocument.createTextNode(
                     this.data.slice( offset ) ),
@@ -149,6 +85,8 @@ function Squire ( doc ) {
         doc.execCommand( 'enableObjectResizing', false, 'false' );
         doc.execCommand( 'enableInlineTableEditing', false, 'false' );
     } catch ( error ) {}
+
+    instances.push( this );
 }
 
 var proto = Squire.prototype;
@@ -210,6 +148,26 @@ proto.fireEvent = function ( type, event ) {
     return this;
 };
 
+proto.destroy = function () {
+    var win = this._win,
+        doc = this._doc,
+        events = this._events,
+        type;
+    win.removeEventListener( 'focus', this, false );
+    win.removeEventListener( 'blur', this, false );
+    for ( type in events ) {
+        if ( !customEvents[ type ] ) {
+            doc.removeEventListener( type, this, true );
+        }
+    }
+    var l = instances.length;
+    while ( l-- ) {
+        if ( instances[l] === this ) {
+            instances.splice( l, 1 );
+        }
+    }
+};
+
 proto.handleEvent = function ( event ) {
     this.fireEvent( event.type, event );
 };
@@ -226,7 +184,7 @@ proto.addEventListener = function ( type, fn ) {
     if ( !handlers ) {
         handlers = this._events[ type ] = [];
         if ( !customEvents[ type ] ) {
-            this._doc.addEventListener( type, this, false );
+            this._doc.addEventListener( type, this, true );
         }
     }
     handlers.push( fn );
@@ -340,7 +298,7 @@ proto._removeZWS = function () {
         return;
     }
     var walker = new TreeWalker( this._body, SHOW_TEXT, function () {
-            return FILTER_ACCEPT;
+            return true;
         }, false ),
         node, index;
     while ( node = walker.nextNode() ) {
@@ -380,11 +338,10 @@ proto._updatePathOnEvent = function () {
 // --- Focus ---
 
 proto.focus = function () {
-    // FF seems to need the body to be focussed
-    // (at least on first load).
-    if ( isGecko ) {
-        this._body.focus();
-    }
+    // FF seems to need the body to be focussed (at least on first load).
+    // Chrome also now needs body to be focussed in order to show the cursor
+    // (otherwise it is focussed, but the cursor doesn't appear).
+    this._body.focus();
     this._win.focus();
     return this;
 };
@@ -597,8 +554,7 @@ proto.hasFormat = function ( tag, attributes, range ) {
     // Otherwise, check each text node at least partially contained within
     // the selection and make sure all of them have the format we want.
     walker = new TreeWalker( root, SHOW_TEXT, function ( node ) {
-        return isNodeContainedInRange( range, node, true ) ?
-            FILTER_ACCEPT : FILTER_SKIP;
+        return isNodeContainedInRange( range, node, true );
     }, false );
 
     var seenNode = false;
@@ -616,7 +572,7 @@ proto._addFormat = function ( tag, attributes, range ) {
     // If the range is collapsed we simply insert the node by wrapping
     // it round the range and focus it.
     var el, walker, startContainer, endContainer, startOffset, endOffset,
-        textnode, needsFormat;
+        textNode, needsFormat;
 
     if ( range.collapsed ) {
         el = fixCursor( this.createElement( tag, attributes ) );
@@ -637,47 +593,54 @@ proto._addFormat = function ( tag, attributes, range ) {
             range.commonAncestorContainer,
             SHOW_TEXT,
             function ( node ) {
-                return isNodeContainedInRange( range, node, true ) ?
-                    FILTER_ACCEPT : FILTER_SKIP;
+                return isNodeContainedInRange( range, node, true );
             },
             false
         );
 
         // Start at the beginning node of the range and iterate through
         // all the nodes in the range that need formatting.
-        startOffset = 0;
-        endOffset = 0;
-        textnode = walker.currentNode = range.startContainer;
+        startContainer = range.startContainer;
+        startOffset = range.startOffset;
+        endContainer = range.endContainer;
+        endOffset = range.endOffset;
 
-        if ( textnode.nodeType !== TEXT_NODE ) {
-            textnode = walker.nextNode();
+        // Make sure we start inside a text node.
+        walker.currentNode = startContainer;
+        if ( startContainer.nodeType !== TEXT_NODE ) {
+            startContainer = walker.nextNode();
+            startOffset = 0;
         }
 
         do {
-            needsFormat = !getNearest( textnode, tag, attributes );
-            if ( textnode === range.endContainer ) {
-                if ( needsFormat && textnode.length > range.endOffset ) {
-                    textnode.splitText( range.endOffset );
-                } else {
-                    endOffset = range.endOffset;
-                }
-            }
-            if ( textnode === range.startContainer ) {
-                if ( needsFormat && range.startOffset ) {
-                    textnode = textnode.splitText( range.startOffset );
-                } else {
-                    startOffset = range.startOffset;
-                }
-            }
+            textNode = walker.currentNode;
+            needsFormat = !getNearest( textNode, tag, attributes );
             if ( needsFormat ) {
+                if ( textNode === endContainer &&
+                        textNode.length > endOffset ) {
+                    textNode.splitText( endOffset );
+                }
+                if ( textNode === startContainer && startOffset ) {
+                    textNode = textNode.splitText( startOffset );
+                    if ( endContainer === startContainer ) {
+                        endContainer = textNode;
+                        endOffset -= startOffset;
+                    }
+                    startContainer = textNode;
+                    startOffset = 0;
+                }
                 el = this.createElement( tag, attributes );
-                replaceWith( textnode, el );
-                el.appendChild( textnode );
-                endOffset = textnode.length;
+                replaceWith( textNode, el );
+                el.appendChild( textNode );
             }
-            endContainer = textnode;
-            if ( !startContainer ) { startContainer = endContainer; }
-        } while ( textnode = walker.nextNode() );
+        } while ( walker.nextNode() );
+
+        // Make sure we finish inside a text node. Otherwise offset may have
+        // changed.
+        if ( endContainer.nodeType !== TEXT_NODE ) {
+            endContainer = textNode;
+            endOffset = textNode.length;
+        }
 
         // Now set the selection to as it was before
         range = this._createRange(
@@ -1097,7 +1060,7 @@ var addLinks = function ( frag ) {
     var doc = frag.ownerDocument,
         walker = new TreeWalker( frag, SHOW_TEXT,
                 function ( node ) {
-            return getNearest( node, 'A' ) ? FILTER_SKIP : FILTER_ACCEPT;
+            return !getNearest( node, 'A' );
         }, false ),
         node, data, parent, match, index, endIndex, child;
     while ( node = walker.nextNode() ) {
@@ -1369,6 +1332,14 @@ var cleanTree = function ( node, allowStyles ) {
                     }
                     continue;
                 }
+                // If we have just white space, it may still be important if it
+                // separates two inline nodes, e.g. "<a>link</a> <a>link</a>".
+                else if ( i && i + 1 < l &&
+                        isInline( children[ i - 1 ] ) &&
+                        isInline( children[ i + 1 ] ) ) {
+                    child.data = ' ';
+                    continue;
+                }
             }
             node.removeChild( child );
             i -= 1;
@@ -1379,10 +1350,9 @@ var cleanTree = function ( node, allowStyles ) {
 };
 
 var notWSTextNode = function ( node ) {
-    return ( node.nodeType === ELEMENT_NODE ?
+    return node.nodeType === ELEMENT_NODE ?
         node.nodeName === 'BR' :
-        notWS.test( node.data ) ) ?
-        FILTER_ACCEPT : FILTER_SKIP;
+        notWS.test( node.data );
 };
 var isLineBreak = function ( br ) {
     var block = br.parentNode,
@@ -1426,17 +1396,23 @@ var cleanupBRs = function ( root ) {
             block = block.parentNode;
         }
         // If this is not inside a block, replace it by wrapping
-        // inlines in DIV.
-        if ( !isBlock( block ) || !tagAfterSplit[ block.nodeName ] ) {
+        // inlines in a <div>.
+        if ( !isBlock( block ) ) {
             fixContainer( block );
         }
-        // If in a block we can split, split it instead, but only if there
-        // is actual text content in the block. Otherwise, the <br> is a
-        // placeholder to stop the block from collapsing, so we must leave
-        // it.
         else {
+            // If it doesn't break a line, just remove it; it's not doing
+            // anything useful. We'll add it back later if required by the
+            // browser. If it breaks a line, split the block or leave it as
+            // appropriate.
             if ( brBreaksLine[l] ) {
-                splitBlock( block, br.parentNode, br );
+                // If in a <div>, split, but anywhere else we might change
+                // the formatting too much (e.g. <li> -> to two list items!)
+                // so just play it safe and leave it.
+                if ( block.nodeName !== 'DIV' ) {
+                    continue;
+                }
+                split( br.parentNode, br, block.parentNode );
             }
             detach( br );
         }
@@ -1518,11 +1494,20 @@ proto._onPaste = function ( event ) {
         startContainer = range.startContainer,
         startOffset = range.startOffset,
         endContainer = range.endContainer,
-        endOffset = range.endOffset;
+        endOffset = range.endOffset,
+        startBlock = getStartBlockOfRange( range );
 
+    // Record undo checkpoint
+    self._recordUndoState( range );
+    self._getRangeAndRemoveBookmark( range );
+
+    // We need to position the pasteArea in the visible portion of the screen
+    // to stop the browser auto-scrolling.
     var pasteArea = this.createElement( 'DIV', {
         style: 'position: absolute; overflow: hidden; top:' +
-            (body.scrollTop + 30) + 'px; left: 0; width: 1px; height: 1px;'
+            ( body.scrollTop +
+                ( startBlock ? startBlock.getBoundingClientRect().top : 0 ) ) +
+            'px; left: 0; width: 1px; height: 1px;'
     });
     body.appendChild( pasteArea );
     range.selectNodeContents( pasteArea );
@@ -1681,8 +1666,11 @@ var keyHandlers = {
         if ( !range ) { return; }
 
         // Save undo checkpoint and add any links in the preceding section.
+        // Remove any zws so we don't think there's content in an empty
+        // block.
         self._recordUndoState( range );
         addLinks( range.startContainer );
+        self._removeZWS();
         self._getRangeAndRemoveBookmark( range );
 
         // Selected text is overwritten, therefore delete the contents
@@ -1790,7 +1778,7 @@ var keyHandlers = {
             // If you try to select the contents of a 'BR', FF will not let
             // you type anything!
             if ( !child || child.nodeName === 'BR' ||
-                    ( child.nodeType === TEXT_NODE && !isOpera ) ) {
+                    ( child.nodeType === TEXT_NODE && !isPresto ) ) {
                 break;
             }
             nodeAfterSplit = child;
@@ -1815,11 +1803,13 @@ var keyHandlers = {
         self._docWasChanged();
     },
     backspace: function ( self, event ) {
+        self._removeZWS();
+        // Record undo checkpoint.
         var range = self.getSelection();
+        self._recordUndoState( range );
+        self._getRangeAndRemoveBookmark( range );
         // If not collapsed, delete contents
         if ( !range.collapsed ) {
-            self._recordUndoState( range );
-            self._getRangeAndRemoveBookmark( range );
             event.preventDefault();
             deleteContentsOfRange( range );
             self._ensureBottomLine();
@@ -1828,8 +1818,6 @@ var keyHandlers = {
         }
         // If at beginning of block, merge with previous
         else if ( rangeDoesStartAtBlockBoundary( range ) ) {
-            self._recordUndoState( range );
-            self._getRangeAndRemoveBookmark( range );
             event.preventDefault();
             var current = getStartBlockOfRange( range ),
                 previous = current && getPreviousBlock( current );
@@ -1872,21 +1860,18 @@ var keyHandlers = {
         // Otherwise, leave to browser but check afterwards whether it has
         // left behind an empty inline tag.
         else {
-            var text = range.startContainer.data || '';
-            if ( !notWS.test( text.charAt( range.startOffset - 1 ) ) ) {
-                self._recordUndoState( range );
-                self._getRangeAndRemoveBookmark( range );
-                self.setSelection( range );
-            }
+            self.setSelection( range );
             setTimeout( function () { afterDelete( self ); }, 0 );
         }
     },
     'delete': function ( self, event ) {
+        self._removeZWS();
+        // Record undo checkpoint.
         var range = self.getSelection();
+        self._recordUndoState( range );
+        self._getRangeAndRemoveBookmark( range );
         // If not collapsed, delete contents
         if ( !range.collapsed ) {
-            self._recordUndoState( range );
-            self._getRangeAndRemoveBookmark( range );
             event.preventDefault();
             deleteContentsOfRange( range );
             self._ensureBottomLine();
@@ -1895,8 +1880,6 @@ var keyHandlers = {
         }
         // If at end of block, merge next into this block
         else if ( rangeDoesEndAtBlockBoundary( range ) ) {
-            self._recordUndoState( range );
-            self._getRangeAndRemoveBookmark( range );
             event.preventDefault();
             var current = getStartBlockOfRange( range ),
                 next = current && getNextBlock( current );
@@ -1925,17 +1908,12 @@ var keyHandlers = {
         // Otherwise, leave to browser but check afterwards whether it has
         // left behind an empty inline tag.
         else {
-            // Record undo point if deleting whitespace
-            var text = range.startContainer.data || '';
-            if ( !notWS.test( text.charAt( range.startOffset ) ) ) {
-                self._recordUndoState( range );
-                self._getRangeAndRemoveBookmark( range );
-                self.setSelection( range );
-            }
+            self.setSelection( range );
             setTimeout( function () { afterDelete( self ); }, 0 );
         }
     },
     tab: function ( self, event ) {
+        self._removeZWS();
         var range = self.getSelection(),
             node, parent;
         // If no selection and in an empty block
@@ -1974,6 +1952,7 @@ var keyHandlers = {
         self._removeZWS();
     }
 };
+
 // Firefox incorrectly handles Cmd-left/Cmd-right on Mac:
 // it goes back/forward in history! Override to do the right
 // thing.
@@ -2019,7 +1998,7 @@ proto._onKey = function ( event ) {
 
     // On keypress, delete and '.' both have event.keyCode 46
     // Must check event.which to differentiate.
-    if ( isOpera && event.which === 46 ) {
+    if ( isPresto && event.which === 46 ) {
         key = '.';
     }
 
@@ -2028,9 +2007,15 @@ proto._onKey = function ( event ) {
         key = 'f' + ( code - 111 );
     }
 
-    if ( event.altKey ) { modifiers += 'alt-'; }
-    if ( event.ctrlKey ) { modifiers += 'ctrl-'; }
-    if ( event.metaKey ) { modifiers += 'meta-'; }
+    // We need to apply the backspace/delete handlers regardless of
+    // control key modifiers.
+    if ( key !== 'backspace' && key !== 'delete' ) {
+        if ( event.altKey  ) { modifiers += 'alt-'; }
+        if ( event.ctrlKey ) { modifiers += 'ctrl-'; }
+        if ( event.metaKey ) { modifiers += 'meta-'; }
+    }
+    // However, on Windows, shift-delete is apparently "cut" (WTF right?), so
+    // we want to let the browser handle shift-delete.
     if ( event.shiftKey ) { modifiers += 'shift-'; }
 
     key = modifiers + key;
diff --git a/source/Node.js b/source/Node.js
index ebca6e2..dc5535f 100644
--- a/source/Node.js
+++ b/source/Node.js
@@ -1,19 +1,4 @@
-/*global
-    ELEMENT_NODE,
-    TEXT_NODE,
-    SHOW_ELEMENT,
-    FILTER_ACCEPT,
-    FILTER_SKIP,
-    win,
-    isOpera,
-    useTextFixer,
-    cantFocusEmptyTextNodes,
-
-    TreeWalker,
-
-    Text
-*/
-/*jshint strict:false */
+/*jshint strict:false, undef:false, unused:false */
 
 var inlineNodeNames  = /^(?:#text|A(?:BBR|CRONYM)?|B(?:R|D[IO])?|C(?:ITE|ODE)|D(?:ATA|FN|EL)|EM|FONT|HR|I(?:NPUT|MG|NS)?|KBD|Q|R(?:P|T|UBY)|S(?:U[BP]|PAN|TR(?:IKE|ONG)|MALL|AMP)?|U|VAR|WBR)$/;
 
@@ -72,13 +57,10 @@ function isContainer ( node ) {
         !isInline( node ) && !isBlock( node );
 }
 
-function acceptIfBlock ( el ) {
-    return isBlock( el ) ? FILTER_ACCEPT : FILTER_SKIP;
-}
 function getBlockWalker ( node ) {
     var doc = node.ownerDocument,
         walker = new TreeWalker(
-            doc.body, SHOW_ELEMENT, acceptIfBlock, false );
+            doc.body, SHOW_ELEMENT, isBlock, false );
     walker.currentNode = node;
     return walker;
 }
@@ -148,6 +130,29 @@ function empty ( node ) {
     return frag;
 }
 
+function createElement ( doc, tag, props, children ) {
+    var el = doc.createElement( tag ),
+        attr, value, i, l;
+    if ( props instanceof Array ) {
+        children = props;
+        props = null;
+    }
+    if ( props ) {
+        for ( attr in props ) {
+            value = props[ attr ];
+            if ( value !== undefined ) {
+                el.setAttribute( attr, props[ attr ] );
+            }
+        }
+    }
+    if ( children ) {
+        for ( i = 0, l = children.length; i < l; i += 1 ) {
+            el.appendChild( children[i] );
+        }
+    }
+    return el;
+}
+
 function fixCursor ( node ) {
     // In Webkit and Gecko, block level elements are collapsed and
     // unfocussable if they have no content. To remedy this, a <BR> must be
@@ -155,7 +160,8 @@ function fixCursor ( node ) {
     // cursor to appear.
     var doc = node.ownerDocument,
         root = node,
-        fixer, child;
+        fixer, child,
+        l, instance;
 
     if ( node.nodeName === 'BODY' ) {
         if ( !( child = node.firstChild ) || child.nodeName === 'BR' ) {
@@ -172,11 +178,22 @@ function fixCursor ( node ) {
     }
 
     if ( isInline( node ) ) {
-        if ( !node.firstChild ) {
+        child = node.firstChild;
+        while ( cantFocusEmptyTextNodes && child &&
+                child.nodeType === TEXT_NODE && !child.data ) {
+            node.removeChild( child );
+            child = node.firstChild;
+        }
+        if ( !child ) {
             if ( cantFocusEmptyTextNodes ) {
                 fixer = doc.createTextNode( '\u200B' );
-                if ( win.editor ) {
-                    win.editor._didAddZWS();
+                // Find the relevant Squire instance and notify
+                l = instances.length;
+                while ( l-- ) {
+                    instance = instances[l];
+                    if ( instance._doc === doc ) {
+                        instance._didAddZWS();
+                    }
                 }
             } else {
                 fixer = doc.createTextNode( '' );
@@ -216,6 +233,42 @@ function fixCursor ( node ) {
     return root;
 }
 
+// Recursively examine container nodes and wrap any inline children.
+function fixContainer ( container ) {
+    var children = container.childNodes,
+        doc = container.ownerDocument,
+        wrapper = null,
+        i, l, child, isBR;
+    for ( i = 0, l = children.length; i < l; i += 1 ) {
+        child = children[i];
+        isBR = child.nodeName === 'BR';
+        if ( !isBR && isInline( child ) ) {
+            if ( !wrapper ) { wrapper = createElement( doc, 'DIV' ); }
+            wrapper.appendChild( child );
+            i -= 1;
+            l -= 1;
+        } else if ( isBR || wrapper ) {
+            if ( !wrapper ) { wrapper = createElement( doc, 'DIV' ); }
+            fixCursor( wrapper );
+            if ( isBR ) {
+                container.replaceChild( wrapper, child );
+            } else {
+                container.insertBefore( wrapper, child );
+                i += 1;
+                l += 1;
+            }
+            wrapper = null;
+        }
+        if ( isContainer( child ) ) {
+            fixContainer( child );
+        }
+    }
+    if ( wrapper ) {
+        container.appendChild( fixCursor( wrapper ) );
+    }
+    return container;
+}
+
 function split ( node, offset, stopNode ) {
     var nodeType = node.nodeType,
         parent, clone, next;
@@ -357,7 +410,7 @@ function mergeWithBlock ( block, next, range ) {
     // Steps to reproduce bug: Type "a-b-c" (where - is return)
     // then backspace twice. The cursor goes to the top instead
     // of after "b".
-    if ( isOpera && ( last = block.lastChild ) && last.nodeName === 'BR' ) {
+    if ( isPresto && ( last = block.lastChild ) && last.nodeName === 'BR' ) {
         block.removeChild( last );
     }
 }
@@ -399,62 +452,3 @@ function mergeContainers ( node ) {
         fixCursor( prev );
     }
 }
-
-// Recursively examine container nodes and wrap any inline children.
-function fixContainer ( container ) {
-    var children = container.childNodes,
-        doc = container.ownerDocument,
-        wrapper = null,
-        i, l, child, isBR;
-    for ( i = 0, l = children.length; i < l; i += 1 ) {
-        child = children[i];
-        isBR = child.nodeName === 'BR';
-        if ( !isBR && isInline( child ) ) {
-            if ( !wrapper ) { wrapper = createElement( doc, 'DIV' ); }
-            wrapper.appendChild( child );
-            i -= 1;
-            l -= 1;
-        } else if ( isBR || wrapper ) {
-            if ( !wrapper ) { wrapper = createElement( doc, 'DIV' ); }
-            fixCursor( wrapper );
-            if ( isBR ) {
-                container.replaceChild( wrapper, child );
-            } else {
-                container.insertBefore( wrapper, child );
-                i += 1;
-                l += 1;
-            }
-            wrapper = null;
-        }
-        if ( isContainer( child ) ) {
-            fixContainer( child );
-        }
-    }
-    if ( wrapper ) {
-        container.appendChild( fixCursor( wrapper ) );
-    }
-    return container;
-}
-
-function createElement ( doc, tag, props, children ) {
-    var el = doc.createElement( tag ),
-        attr, value, i, l;
-    if ( props instanceof Array ) {
-        children = props;
-        props = null;
-    }
-    if ( props ) {
-        for ( attr in props ) {
-            value = props[ attr ];
-            if ( value !== undefined ) {
-                el.setAttribute( attr, props[ attr ] );
-            }
-        }
-    }
-    if ( children ) {
-        for ( i = 0, l = children.length; i < l; i += 1 ) {
-            el.appendChild( children[i] );
-        }
-    }
-    return el;
-}
diff --git a/source/Range.js b/source/Range.js
index 3efdde1..a7c5a72 100644
--- a/source/Range.js
+++ b/source/Range.js
@@ -1,28 +1,4 @@
-/*global
-    ELEMENT_NODE,
-    TEXT_NODE,
-    SHOW_TEXT,
-    FILTER_ACCEPT,
-    START_TO_START,
-    START_TO_END,
-    END_TO_END,
-    END_TO_START,
-    indexOf,
-
-    TreeWalker,
-
-    isLeaf,
-    isInline,
-    isBlock,
-    getPreviousBlock,
-    getNextBlock,
-    getLength,
-    fixCursor,
-    split,
-    mergeWithBlock,
-    mergeContainers
-*/
-/*jshint strict:false */
+/*jshint strict:false, undef:false, unused:false */
 
 var getNodeBefore = function ( node, offset ) {
     var children = node.childNodes;
@@ -59,8 +35,8 @@ var forEachTextNodeInRange = function ( range, fn ) {
         endContainer = range.endContainer,
         root = range.commonAncestorContainer,
         walker = new TreeWalker(
-            root, SHOW_TEXT, function ( node ) {
-                return FILTER_ACCEPT;
+            root, SHOW_TEXT, function (/* node */) {
+                return true;
         }, false ),
         textnode = walker.currentNode = startContainer;
 
@@ -451,50 +427,56 @@ var getEndBlockOfRange = function ( range ) {
     return block && isNodeContainedInRange( range, block, true ) ? block : null;
 };
 
+var contentWalker = new TreeWalker( null,
+    SHOW_TEXT|SHOW_ELEMENT,
+    function ( node ) {
+        return node.nodeType === TEXT_NODE ?
+            notWS.test( node.data ) :
+            node.nodeName === 'IMG';
+    }
+);
+
 var rangeDoesStartAtBlockBoundary = function ( range ) {
     var startContainer = range.startContainer,
-        startOffset = range.startOffset,
-        parent, child;
+        startOffset = range.startOffset;
 
-    while ( isInline( startContainer ) ) {
+    // If in the middle or end of a text node, we're not at the boundary.
+    if ( startContainer.nodeType === TEXT_NODE ) {
         if ( startOffset ) {
             return false;
         }
-        parent = startContainer.parentNode;
-        startOffset = indexOf.call( parent.childNodes, startContainer );
-        startContainer = parent;
+        contentWalker.currentNode = startContainer;
+    } else {
+        contentWalker.currentNode = getNodeAfter( startContainer, startOffset );
     }
-    // Skip empty text nodes and <br>s.
-    while ( startOffset &&
-            ( child = startContainer.childNodes[ startOffset - 1 ] ) &&
-            ( child.data === '' || child.nodeName === 'BR' ) ) {
-        startOffset -= 1;
-    }
-    return !startOffset;
+
+    // Otherwise, look for any previous content in the same block.
+    contentWalker.root = getStartBlockOfRange( range );
+
+    return !contentWalker.previousNode();
 };
 
 var rangeDoesEndAtBlockBoundary = function ( range ) {
     var endContainer = range.endContainer,
         endOffset = range.endOffset,
-        length = getLength( endContainer ),
-        parent, child;
+        length;
 
-    while ( isInline( endContainer ) ) {
-        if ( endOffset !== length ) {
+    // If in a text node with content, and not at the end, we're not
+    // at the boundary
+    if ( endContainer.nodeType === TEXT_NODE ) {
+        length = endContainer.data.length;
+        if ( length && endOffset < length ) {
             return false;
         }
-        parent = endContainer.parentNode;
-        endOffset = indexOf.call( parent.childNodes, endContainer ) + 1;
-        endContainer = parent;
-        length = endContainer.childNodes.length;
+        contentWalker.currentNode = endContainer;
+    } else {
+        contentWalker.currentNode = getNodeBefore( endContainer, endOffset );
     }
-    // Skip empty text nodes and <br>s.
-    while ( endOffset < length &&
-            ( child = endContainer.childNodes[ endOffset ] ) &&
-            ( child.data === '' || child.nodeName === 'BR' ) ) {
-        endOffset += 1;
-    }
-    return endOffset === length;
+
+    // Otherwise, look for any further content in the same block.
+    contentWalker.root = getEndBlockOfRange( range );
+
+    return !contentWalker.nextNode();
 };
 
 var expandRangeToBlockBoundaries = function ( range ) {
diff --git a/source/Squire-UI.css b/source/Squire-UI.css
index 43628ab..6408632 100644
--- a/source/Squire-UI.css
+++ b/source/Squire-UI.css
@@ -36,7 +36,7 @@ body {
 }
 
 iframe {
-    width: 100%; 
+    width: 100%;
     border: 1px #919191 solid;
     border-radius: 4px;
     -webkit-border-radius: 4px;
@@ -50,13 +50,14 @@ iframe {
     outline: none;
     box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
 }
-  
+
 .menu .item {
     color:#000;
     float:left;
     background:#FFF;
     padding:10px;
     border-left:1px #EEE solid;
+    border-bottom: 3px transparent solid;
     -webkit-font-smoothing:subpixel-antialiased
 }
 
@@ -109,7 +110,7 @@ input[type=text] {
 }
 
 .menu .group .item:hover, .menu .item:first-child:hover {
-	border-left: 3px #55ACEE solid;
+	border-bottom: 3px #55ACEE solid;
 }
 
 .menu .item:first-child {
diff --git a/source/Squire-UI.js b/source/Squire-UI.js
index 17fff00..517f8bf 100644
--- a/source/Squire-UI.js
+++ b/source/Squire-UI.js
@@ -61,7 +61,7 @@ $(document).ready(function() {
         $('.quit').unbind().click(function () {
           $(this).parent().parent().removeClass('drop-open');
         });
-        
+
         $('.sumbitImageURL').unbind().click(function () {
           console.log("Passed through .sumbitImageURL");
           var editor = iframe.contentWindow.editor;
@@ -90,7 +90,7 @@ $(document).ready(function() {
           var selectedFonts = $('select#fontSelect option:selected').last().data('fonts');
           var fontSize =  $('select#textSelector option:selected').last().data('size') + 'px';
           editor.setFontSize(fontSize);
-          
+
           try {
             editor.setFontFace(selectedFonts);
           } catch (e) {
@@ -98,17 +98,17 @@ $(document).ready(function() {
           } finally {
             $(this).parent().parent().removeClass('drop-open');
           }
-          
+
         });
 
-        
+
       });
 
       $('.item').click(function() {
         var iframe = $(this).parents('.Squire-UI').next('iframe').first()[0];
         var editor = iframe.contentWindow.editor;
         var action = $(this).data('action');
-        
+
         test = {
           value: $(this).data('action'),
           testBold: editor.testPresenceinSelection('bold',
@@ -143,18 +143,18 @@ $(document).ready(function() {
         } else if (test.isNotValue('makeLink') | test.isNotValue('insertImage') | test.isNotValue('selectFont')) {
           // do nothing these are dropdowns.
         } else {
-          if (editor.getSelectedText() === '' && !(action == 'insertImage' || action == 'makeOrderedList' || action == 'increaseQuoteLevel' || action == 'redo' || action == 'undo')) return;
             editor[action]();
+            editor.focus();
         }
       });
     });
-    
+
     $(container).append(div);
     $(container).append(iframe);
 
     var style = document.createElement('style');
     style.innerHTML = 'blockquote { border-left: 3px green solid; padding-left: 5px; }';
-    
+
 
     iframe.contentWindow.editor = new Squire(iframe.contentWindow.document);
     iframe.addEventListener('load', function() {
@@ -164,4 +164,4 @@ $(document).ready(function() {
     iframe.contentWindow.document.head.appendChild(style);
     return iframe.contentWindow.editor;
   };
-});
\ No newline at end of file
+});
diff --git a/source/TreeWalker.js b/source/TreeWalker.js
index 8bf7ffc..e2490c0 100644
--- a/source/TreeWalker.js
+++ b/source/TreeWalker.js
@@ -1,4 +1,3 @@
-/*global FILTER_ACCEPT */
 /*jshint strict:false */
 
 /*
@@ -52,7 +51,7 @@ TreeWalker.prototype.nextNode = function () {
             return null;
         }
         if ( ( typeToBitArray[ node.nodeType ] & nodeType ) &&
-                filter( node ) === FILTER_ACCEPT ) {
+                filter( node ) ) {
             this.currentNode = node;
             return node;
         }
@@ -82,7 +81,7 @@ TreeWalker.prototype.previousNode = function () {
             return null;
         }
         if ( ( typeToBitArray[ node.nodeType ] & nodeType ) &&
-                filter( node ) === FILTER_ACCEPT ) {
+                filter( node ) ) {
             this.currentNode = node;
             return node;
         }
diff --git a/source/assets/font-awesome/font-awesome.min.css b/source/assets/font-awesome/font-awesome.min.css
index 82f960d..cf61c73 100755
--- a/source/assets/font-awesome/font-awesome.min.css
+++ b/source/assets/font-awesome/font-awesome.min.css
@@ -1,4 +1,22 @@
 /*!
  *  Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
  *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
- */@font-face{font-family:'FontAwesome';src:url('./font-awesome/fontawesome-webfont.eot?v=4.1.0');src:url('./font-awesome/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('./font-awesome/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('./font-awesome/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('./font-awesome/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1)}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-square:before,.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}
\ No newline at end of file
+ */@font-face{font-family:'FontAwesome';src:url('./font-awesome/fontawesome-webfont.eot?v=4.1.0');src:url('./font-awesome/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('./font-awesome/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('./font-awesome/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('./font-awesome/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}
+ .fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
+ .fa-bold:before{content:"\f032"}
+ .fa-italic:before{content:"\f033"}
+ .fa-underline:before{content:"\f0cd"}
+ .fa-font:before{content:"\f031"}
+ .fa-link:before{content:"\f0c1"}
+ .fa-list-alt:before{content:"\f022"}
+ .fa-list:before{content:"\f03a"}
+ .fa-picture-o:before{content:"\f03e"}
+ .fa-quote-right:before{content:"\f10e"}
+ .fa-chevron-up:before{content:"\f077"}
+ .fa-header:before{content:"\f1dc"}
+.fa-align-left:before{content:"\f036"}
+.fa-align-center:before{content:"\f037"}
+.fa-align-right:before{content:"\f038"}
+.fa-align-justify:before{content:"\f039"}
+.fa-undo:before{content:"\f0e2"}
+.fa-heart:before{content:"\f004"}
\ No newline at end of file
diff --git a/source/document.html b/source/document.html
index 428e909..cc73699 100644
--- a/source/document.html
+++ b/source/document.html
@@ -49,9 +49,6 @@
 </style>
 </head>
 <body>
-<!--[if IE 8]>
-<script type="text/javascript" src="ie8.js"></script>
-<![endif]-->
 <script type="text/javascript" src="squire.js"></script>
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/source/ie8dom.js b/source/ie8dom.js
deleted file mode 100644
index 0b6fd9e..0000000
--- a/source/ie8dom.js
+++ /dev/null
@@ -1,157 +0,0 @@
-/* Copyright © 2011-2012 by Neil Jenkins. Licensed under the MIT license. */
-
-( function () {
-
-/*global window, document, Element, HTMLDocument */
-/*jshint strict: false */
-
-var doc = document;
-
-// Add JS hook
-window.ie = 8;
-
-// Add defaultView property to document
-doc.defaultView = window;
-
-// Fake W3C events support
-var translate = {
-    focus: 'focusin',
-    blur: 'focusout'
-};
-
-var returnTrue = function () { return true; };
-var returnFalse = function () { return false; };
-
-var toCopy = 'altKey ctrlKey metaKey shiftKey clientX clientY charCode keyCode'.split( ' ' );
-
-var DOMEvent = function ( event ) {
-    var type = event.type,
-        doc = document,
-        target = event.srcElement || doc,
-        html = ( target.ownerDocument || doc ).documentElement,
-        l = toCopy.length,
-        property;
-
-    while ( l-- ) {
-        property = toCopy[l];
-        this[ property ] = event[ property ];
-    }
-
-    if ( type === 'propertychange' ) {
-        type = ( target.nodeName === 'INPUT' &&
-                target.type !== 'text' && target.type !== 'password' ) ?
-            'change' : 'input';
-    }
-
-    this.type = Object.keyOf( translate, type ) || type;
-    this.target = target;
-    this.pageX = event.clientX + html.scrollLeft;
-    this.pageY = event.clientY + html.scrollTop;
-
-    if ( event.button ) {
-        this.button = ( event.button & 4 ? 1 :
-            ( event.button & 2 ? 2 : 0 ) );
-        this.which = this.button + 1;
-    }
-
-    this.relatedTarget = event.fromElement === target ?
-        event.toElement : event.fromElement;
-    this._event = event;
-};
-
-DOMEvent.prototype = {
-    constructor: DOMEvent,
-    isEvent: true,
-    preventDefault: function () {
-        this.isDefaultPrevented = returnTrue;
-        this._event.returnValue = false;
-    },
-    stopPropagation: function () {
-        this.isPropagationStopped = returnTrue;
-        this._event.cancelBubble = true;
-    },
-    isDefaultPrevented: returnFalse,
-    isPropagationStopped: returnFalse
-};
-
-// Add W3C event add/remove methods to elements and document.
-[ doc, Element.prototype ].forEach(
-        function ( dom ) {
-    dom.addEventListener = function ( type, handler, capture ) {
-        var fn = handler._ie_handleEvent || ( handler._ie_handleEvent =
-                function () {
-                    var event = new DOMEvent( window.event );
-                    if ( typeof handler === 'object' ) {
-                        handler.handleEvent( event );
-                    } else {
-                        handler.call( this, event );
-                    }
-                }
-            ),
-            node = /paste|cut/.test( type ) ? this.body || this : this;
-
-        handler._ie_registeredCount = ( handler._ie_registeredCount || 0 ) + 1;
-
-        node.attachEvent( 'on' + ( translate[ type ] || type ), fn );
-    };
-    dom.addEventListener.isFake = true;
-
-    dom.removeEventListener = function ( type, handler, capture ) {
-        var fn = handler._ie_handleEvent,
-            node = /paste|cut/.test( type ) ? this.body || this : this;
-        if ( !( handler._ie_registeredCount -= 1 ) ) {
-            delete handler._ie_handleEvent;
-        }
-        if ( fn ) {
-            node.detachEvent( 'on' + ( translate[ type ] || type ), fn );
-        }
-    };
-    dom.removeEventListener.isFake = true;
-});
-
-// The events that we normally attach to the window object, IE8 wants on the
-// body.
-doc.defaultView.addEventListener = function ( type, handler, capture ) {
-    return doc.addEventListener( type, handler, capture );
-};
-
-// Add textContent property to elements.
-Object.defineProperty( Element.prototype, 'textContent', {
-    get: function () {
-        return this.innerText;
-    },
-
-    set: function ( text ) {
-        this.innerText = text;
-    }
-});
-
-// Add compareDocumentPosition method to elements.
-Element.prototype.compareDocumentPosition = function ( b ) {
-    if ( b.nodeType !== 1 ) { b = b.parentNode; }
-    var a = this,
-        different = ( a !== b ),
-        aIndex = a.sourceIndex,
-        bIndex = b.sourceIndex;
-
-    return ( different && a.contains( b ) ? 16 : 0 ) +
-        ( different && b.contains( a ) ? 8 : 0 ) +
-        ( aIndex < bIndex ? 4 : 0 ) +
-        ( bIndex < aIndex ? 2 : 0 );
-};
-
-// Add normalize method to document fragments
-HTMLDocument.prototype.normalize = function () {
-    var children = this.childNodes,
-        l = children.length,
-        child;
-
-    while ( l-- ) {
-        child = children[l];
-        if ( child.nodeType === 1 ) {
-            child.normalize();
-        }
-    }
-};
-
-}() );
diff --git a/source/ie8range.js b/source/ie8range.js
deleted file mode 100644
index 1c54e52..0000000
--- a/source/ie8range.js
+++ /dev/null
@@ -1,487 +0,0 @@
-/* Copyright © 2011-2012 by Neil Jenkins. Licensed under the MIT license.
-
-   IE TextRange <-> W3C Range code adapted from Rangy:
-   http://code.google.com/p/rangy/
-   Copyright 2012, Tim Down. Licensed under the MIT license.
-*/
-
-var Range;
-
-( function () {
-
-/*global window, document */
-/*jshint strict: false */
-
-var indexOf = Array.prototype.indexOf;
-
-var START_TO_START = 0;
-var START_TO_END   = 1;
-var END_TO_START   = 3;
-
-var contains = function ( a, b ) {
-    while ( b = b.parentNode ) {
-        if ( a === b ) { return true; }
-    }
-    return false;
-};
-
-var getCommonAncestor = function ( a, b ) {
-    var commonAncestor,
-        aParents, bParents,
-        aL, bL;
-
-    if ( a === b || contains( a, b ) ) {
-        commonAncestor = a;
-    } else if ( contains( b, a ) ) {
-        commonAncestor = b;
-    } else {
-        aParents = [];
-        bParents = [];
-        while ( a = a.parentNode ) {
-            aParents.push( a );
-        }
-        while ( b = b.parentNode ) {
-            bParents.push( b );
-        }
-        aL = aParents.length;
-        bL = bParents.length;
-        while ( aL-- && bL-- ) {
-            if ( aParents[ aL ] !== bParents[ bL ] ) {
-                commonAncestor = aParents[ aL + 1 ];
-                break;
-            }
-        }
-        if ( !commonAncestor ) {
-            commonAncestor = ( aL === -1 ? aParents[0] : bParents[0] );
-        }
-    }
-    return commonAncestor;
-};
-
-Range = function ( startContainer, startOffset, endContainer, endOffset ) {
-    startContainer = startContainer || document;
-    startOffset = startOffset || 0;
-
-    this.startContainer = startContainer;
-    this.startOffset = startOffset;
-    this.endContainer = endContainer || startContainer;
-    this.endOffset = endOffset !== undefined ? endOffset : startOffset;
-    this._updateCollapsedAndAncestor();
-};
-
-Range.prototype = {
-    constructor: Range,
-
-    _updateCollapsedAndAncestor: function () {
-        this.collapsed = (
-            this.startContainer === this.endContainer &&
-            this.startOffset === this.endOffset
-        );
-        this.commonAncestorContainer =
-            getCommonAncestor( this.startContainer, this.endContainer );
-    },
-    setStart: function ( node, offset ) {
-        this.startContainer = node;
-        this.startOffset = offset;
-        this._updateCollapsedAndAncestor();
-    },
-    setEnd: function ( node, offset ) {
-        this.endContainer = node;
-        this.endOffset = offset;
-        this._updateCollapsedAndAncestor();
-    },
-    setStartAfter: function ( node ) {
-        var parent = node.parentNode;
-        this.setStart( parent, indexOf.call( parent.childNodes, node ) + 1 );
-    },
-    setEndBefore: function ( node ) {
-        var parent = node.parentNode;
-        this.setEnd( parent, indexOf.call( parent.childNodes, node ) );
-    },
-    selectNode: function ( node ) {
-        var parent = node.parentNode,
-            offset = indexOf.call( parent.childNodes, node );
-        this.setStart( parent, offset );
-        this.setEnd( parent, offset + 1 );
-    },
-    selectNodeContents: function ( node ) {
-        this.setStart( node, 0 );
-        this.setEnd( node, node.childNodes.length );
-    },
-    cloneRange: function () {
-        return new Range(
-            this.startContainer,
-            this.startOffset,
-            this.endContainer,
-            this.endOffset
-        );
-    },
-    collapse: function ( toStart ) {
-        if ( toStart ) {
-            this.setEnd( this.startContainer, this.startOffset );
-        } else {
-            this.setStart( this.endContainer, this.endOffset );
-        }
-    },
-    compareBoundaryPoints: function ( how, sourceRange ) {
-        var aContainer, aOffset, bContainer, bOffset, node, parent;
-        if ( how === START_TO_START || how === END_TO_START ) {
-            aContainer = this.startContainer;
-            aOffset = this.startOffset;
-        } else {
-            aContainer = this.endContainer;
-            aOffset = this.endOffset;
-        }
-        if ( how === START_TO_START || how === START_TO_END ) {
-            bContainer = sourceRange.startContainer;
-            bOffset = sourceRange.startOffset;
-        } else {
-            bContainer = sourceRange.endContainer;
-            bOffset = sourceRange.endOffset;
-        }
-        if ( aContainer === bContainer ) {
-            return aOffset < bOffset ? -1 :
-                aOffset > bOffset ? 1 : 0;
-        }
-
-        node = aContainer;
-        while ( parent = node.parentNode ) {
-            if ( parent === bContainer ) {
-                return indexOf.call( parent.childNodes, node ) < bOffset ?
-                    -1 : 1;
-            }
-            node = parent;
-        }
-        node = bContainer;
-        while ( parent = node.parentNode ) {
-            if ( parent === aContainer ) {
-                return indexOf.call( parent.childNodes, node ) < aOffset ?
-                    1 : -1;
-            }
-            node = parent;
-        }
-        if ( aContainer.nodeType !== 1 ) {
-            aContainer = aContainer.parentNode;
-        }
-        if ( bContainer.nodeType !== 1 ) {
-            bContainer = bContainer.parentNode;
-        }
-        return aContainer.sourceIndex < bContainer.sourceIndex ? -1 :
-            aContainer.sourceIndex > bContainer.sourceIndex ? 1 : 0;
-    }
-};
-
-document.createRange = function () {
-    return new Range();
-};
-
-// ---
-
-var isAncestorOf = function ( ancestor, descendant ) {
-    return ancestor === descendant || contains( ancestor, descendant );
-};
-
-var isCharacterDataNode = function ( node ) {
-    var nodeType = node.nodeType;
-    // Text, CDataSection or Comment
-    return nodeType === 3 || nodeType === 4 || nodeType === 8;
-};
-
-var DomPosition = function ( node, offset ) {
-    this.node = node;
-    this.offset = offset;
-};
-
-var getTextRangeContainerElement = function ( textRange ) {
-    var parentEl = textRange.parentElement(),
-        range, startEl, endEl, startEndContainer;
-
-    range = textRange.duplicate();
-    range.collapse( true );
-    startEl = range.parentElement();
-    range = textRange.duplicate();
-    range.collapse( false );
-    endEl = range.parentElement();
-    startEndContainer = ( startEl === endEl ) ?
-        startEl : getCommonAncestor( startEl, endEl );
-
-    return startEndContainer === parentEl ?
-        startEndContainer : getCommonAncestor( parentEl, startEndContainer );
-};
-
-// Gets the boundary of a TextRange expressed as a node and an offset within
-// that node. This function started out as an improved version of code found in
-// Tim Cameron Ryan's IERange (http://code.google.com/p/ierange/) but has grown,
-// fixing problems with line breaks in preformatted text, adding workaround for
-// IE TextRange bugs, handling for inputs and images, plus optimizations.
-var getTextRangeBoundaryPosition = function (
-        textRange, wholeRangeContainerElement, isStart, isCollapsed ) {
-    var workingRange = textRange.duplicate();
-
-    workingRange.collapse( isStart );
-
-    var containerElement = workingRange.parentElement();
-
-    // Sometimes collapsing a TextRange that's at the start of a text node can
-    // move it into the previous node, so check for that TODO: Find out when.
-    // Workaround for wholeRangeContainerElement may break this
-    if ( !isAncestorOf( wholeRangeContainerElement, containerElement ) ) {
-        containerElement = wholeRangeContainerElement;
-    }
-
-    // Deal with nodes that cannot "contain rich HTML markup". In practice, this
-    // means form inputs, images and similar. See
-    // http://msdn.microsoft.com/en-us/library/aa703950%28VS.85%29.aspx
-    if ( !containerElement.canHaveHTML ) {
-        return new DomPosition(
-            containerElement.parentNode,
-            indexOf.call(
-                containerElement.parentNode.childNodes, containerElement )
-        );
-    }
-
-    var workingNode = document.createElement( 'span' ),
-        workingComparisonType = isStart ? 'StartToStart' : 'StartToEnd',
-        comparison, previousNode, nextNode, boundaryPosition, boundaryNode;
-
-    // Move the working range through the container's children, starting at the
-    // end and working backwards, until the working range reaches or goes past
-    // the boundary we're interested in
-    do {
-        containerElement.insertBefore(
-            workingNode, workingNode.previousSibling );
-        workingRange.moveToElementText( workingNode );
-        comparison =
-            workingRange.compareEndPoints( workingComparisonType, textRange );
-    } while ( comparison > 0 && workingNode.previousSibling );
-
-    // We've now reached or gone past the boundary of the text range we're
-    // interested in so have identified the node we want
-    boundaryNode = workingNode.nextSibling;
-
-    if ( comparison === -1 && boundaryNode &&
-            isCharacterDataNode( boundaryNode ) ) {
-        // This is a character data node (text, comment, cdata). The working
-        // range is collapsed at the start of the node containing the text
-        // range's boundary, so we move the end of the working range to the
-        // boundary point and measure the length of its text to get the
-        // boundary's offset within the node.
-        workingRange.setEndPoint(
-            isStart ? 'EndToStart' : 'EndToEnd', textRange );
-
-        var offset;
-
-        if ( /[\r\n]/.test( boundaryNode.data ) ||
-             /[\r\n]/.test( workingRange.text ) ) {
-            /*
-            For the particular case of a boundary within a text node containing
-            line breaks (within a <pre> element, for example), we need a
-            slightly complicated approach to get the boundary's offset in IE.
-            The facts:
-
-            - Each line break is represented as \r in the text node's
-              data/nodeValue properties
-            - Each line break is represented as \r\n in the TextRange's 'text'
-              property
-            - The 'text' property of the TextRange does not contain trailing
-              line breaks
-
-            To get round the problem presented by the final fact above, we can
-            use the fact that TextRange's moveStart() and moveEnd() methods
-            return the actual number of characters moved, which is not
-            necessarily the same as the number of characters it was instructed
-            to move. The simplest approach is to use this to store the
-            characters moved when moving both the start and end of the range to
-            the start of the document body and subtracting the start offset from
-            the end offset (the "move-negative-gazillion" method). However, this
-            is extremely slow when the document is large and the range is near
-            the end of it. Clearly doing the mirror image (i.e. moving the range
-            boundaries to the end of the document) has the same problem.
-
-            Another approach that works is to use moveStart() to move the start
-            boundary of the range up to the end boundary one character at a time
-            and incrementing a counter with the value returned by the
-            moveStart() call. However, the check for whether the start boundary
-            has reached the end boundary is expensive, so this method is slow
-            (although unlike "move-negative-gazillion" is largely unaffected by
-            the location of the range within the document).
-
-            The method below is a hybrid of the two methods above. It uses the
-            fact that a string containing the TextRange's 'text' property with
-            each \r\n converted to a single \r character cannot be longer than
-            the text of the TextRange, so the start of the range is moved that
-            length initially and then a character at a time to make up for any
-            trailing line breaks not contained in the 'text' property. This has
-            good performance in most situations compared to the previous two
-            methods.
-            */
-            var tempRange = workingRange.duplicate();
-            var rangeLength = tempRange.text.replace( /\r\n/g, '\r' ).length;
-
-            offset = tempRange.moveStart( 'character', rangeLength);
-            while ( ( comparison =
-                    tempRange.compareEndPoints( 'StartToEnd', tempRange )
-                    ) === -1 ) {
-                offset += 1;
-                tempRange.moveStart( 'character', 1 );
-            }
-        } else {
-            offset = workingRange.text.length;
-        }
-        boundaryPosition = new DomPosition( boundaryNode, offset );
-    }
-    else {
-        // If the boundary immediately follows a character data node and this is
-        // the end boundary, we should favour a position within that, and
-        // likewise for a start boundary preceding a character data node
-        previousNode = ( isCollapsed || !isStart ) &&
-            workingNode.previousSibling;
-        nextNode = ( isCollapsed || isStart ) && workingNode.nextSibling;
-
-        if ( nextNode && isCharacterDataNode( nextNode ) ) {
-            boundaryPosition = new DomPosition( nextNode, 0 );
-        } else if ( previousNode && isCharacterDataNode( previousNode ) ) {
-            // Strange bug: if we don't read the data property, the length
-            // property is often returned incorrectly as 0. Don't ask me why.
-            // Therefore get the length from the data property rather than
-            // reading it directly from the node.
-            boundaryPosition = new DomPosition(
-                previousNode, previousNode.data.length );
-        } else {
-            boundaryPosition = new DomPosition(
-                containerElement,
-                indexOf.call( containerElement.childNodes, workingNode )
-            );
-        }
-    }
-
-    // Clean up
-    workingNode.parentNode.removeChild( workingNode );
-
-    return boundaryPosition;
-};
-
-// Returns a TextRange representing the boundary of a TextRange expressed as a
-// node and an offset within that node. This function started out as an
-// optimized version of code found in Tim Cameron Ryan's IERange
-// (http://code.google.com/p/ierange/)
-var createBoundaryTextRange = function ( boundaryPosition, isStart ) {
-    var boundaryNode, boundaryParent, boundaryOffset = boundaryPosition.offset;
-    var doc = document;
-    var workingNode, childNodes, workingRange = doc.body.createTextRange();
-    var nodeIsDataNode = isCharacterDataNode( boundaryPosition.node );
-
-    if ( nodeIsDataNode ) {
-        boundaryNode = boundaryPosition.node;
-        boundaryParent = boundaryNode.parentNode;
-    } else {
-        childNodes = boundaryPosition.node.childNodes;
-        boundaryNode = ( boundaryOffset < childNodes.length ) ?
-            childNodes[ boundaryOffset ] : null;
-        boundaryParent = boundaryPosition.node;
-    }
-
-    // Position the range immediately before the node containing the boundary
-    workingNode = doc.createElement( 'span' );
-
-    // Making the working element non-empty element persuades IE to consider the
-    // TextRange boundary to be within the element rather than immediately
-    // before or after it, which is what we want
-    workingNode.innerHTML = '&#xfeff;';
-
-    // insertBefore is supposed to work like appendChild if the second parameter
-    // is null. However, a bug report for IERange suggests that it can crash the
-    // browser: http://code.google.com/p/ierange/issues/detail?id=12
-    if ( boundaryNode ) {
-        boundaryParent.insertBefore( workingNode, boundaryNode );
-    } else {
-        boundaryParent.appendChild( workingNode );
-    }
-
-    workingRange.moveToElementText( workingNode );
-    workingRange.collapse( !isStart );
-
-    // Clean up
-    boundaryParent.removeChild( workingNode );
-
-    // Move the working range to the text offset, if required
-    if ( nodeIsDataNode ) {
-        workingRange[ isStart ? 'moveStart' : 'moveEnd' ](
-            'character', boundaryOffset );
-    }
-
-    return workingRange;
-};
-
-var toDOMRange = function ( textRange ) {
-    var rangeContainerElement = getTextRangeContainerElement( textRange ),
-        start, end;
-
-    if ( textRange.compareEndPoints( 'StartToEnd', textRange ) === 0 ) {
-        start = end = getTextRangeBoundaryPosition(
-            textRange, rangeContainerElement, true, true );
-    } else {
-        start = getTextRangeBoundaryPosition(
-            textRange, rangeContainerElement, true, false );
-        end = getTextRangeBoundaryPosition(
-            textRange, rangeContainerElement, false, false );
-    }
-    return new Range(
-        start.node,
-        start.offset,
-        end.node,
-        end.offset
-    );
-};
-
-var toTextRange = function ( range ) {
-    var textRange, startRange, endRange;
-    if ( range.collapsed ) {
-        textRange = createBoundaryTextRange(
-            new DomPosition( range.startContainer, range.startOffset ), true);
-    } else {
-        startRange = createBoundaryTextRange(
-            new DomPosition( range.startContainer, range.startOffset ), true);
-        endRange = createBoundaryTextRange(
-            new DomPosition( range.endContainer, range.endOffset ), false );
-        textRange = document.body.createTextRange();
-        textRange.setEndPoint( 'StartToStart', startRange);
-        textRange.setEndPoint( 'EndToEnd', endRange);
-    }
-    return textRange;
-};
-
-var selection = {
-    rangeCount: 0,
-    getRangeAt: function ( index ) {
-        if ( index !== 0 ) { return undefined; }
-        var sel = document.selection.createRange();
-        // Check if we have a control range.
-        if ( sel.add ) {
-            var range = document.createRange();
-            range.moveToElementText( sel.item( 0 ) );
-            range.collapse( false );
-            range.select();
-            sel = range;
-        }
-        return toDOMRange( sel );
-    },
-    removeAllRanges: function () {},
-    addRange: function ( range ) {
-        toTextRange( range ).select();
-    }
-};
-
-document.attachEvent( 'onbeforeactivate', function () {
-    selection.rangeCount = 1;
-});
-
-document.attachEvent( 'ondeactivate', function () {
-    selection.rangeCount = 0;
-});
-
-window.getSelection = function () {
-    return selection;
-};
-
-}() );
diff --git a/source/ie8types.js b/source/ie8types.js
deleted file mode 100644
index 7a3361c..0000000
--- a/source/ie8types.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* Copyright © 2011-2012 by Neil Jenkins. Licensed under the MIT license. */
-
-( function () {
-
-/*jshint strict: false */
-
-// Note: Does not inclue the `if ( i in this ) {}` check these function should
-// have, as IE8 will return false if this[i] is undefined (at least if the array
-// was defined with a literal, e.g. `[ undefined, undefined ]`).
-
-Array.prototype.indexOf = function ( item, from ) {
-    var l = this.length;
-    for ( var i = ( from < 0 ) ? Math.max( 0, l + from ) : from || 0;
-            i < l; i += 1 ) {
-        if ( this[i] === item ) {
-            return i;
-        }
-    }
-    return -1;
-};
-
-Array.prototype.forEach = function ( fn, bind ) {
-    var l = this.length >>> 0;
-    if ( typeof fn !== 'function' ) {
-        throw new TypeError();
-    }
-    for ( var i = 0; i < l; i += 1 ) {
-        fn.call( bind, this[i], i, this );
-    }
-};
-
-Array.prototype.filter = function ( fn, bind ) {
-    var results = [];
-    for ( var i = 0, l = this.length; i < l; i += 1 ) {
-        var value = this[i];
-        if ( fn.call( bind, value, i, this ) ) {
-            results.push( value );
-        }
-    }
-    return results;
-};
-
-Object.keyOf = function ( object, value ) {
-    for ( var key in object ) {
-        if ( object[ key ] === value ) {
-            return key;
-        }
-    }
-};
-
-Date.now = function () {
-    return +( new Date() );
-};
-
-String.prototype.trim = function () {
-    var str = this.replace( /^\s\s*/, '' ),
-        ws = /\s/,
-        i = str.length;
-    while ( ws.test( str.charAt( i -= 1 ) ) ) {/* Empty! */}
-    return str.slice( 0, i + 1 );
-};
-
-}() );
diff --git a/source/outro.js b/source/outro.js
index a8f1a62..1a660b9 100644
--- a/source/outro.js
+++ b/source/outro.js
@@ -1,4 +1,3 @@
-/*global top, win, doc, Squire */
 
 if ( top !== win ) {
     win.editor = new Squire( doc );