added support for mouse-driven paste events; cleaned up some issues when JSHinted; optimized space concatenation