Removed the Coffeescript version and tidied up the JS version to be more readable.
Fixed the issue with activeState not working correctly - bold, italics, justifyLeft, justifyCenter, justifyRight and html update their active state correctly now.