Included reviewer comments

I still have to fix the issue with updating positions in the document's model within the UI Thread.
This is actually a source of issue as it can severly degrade editor's performance, but I need to set aside some time to get to the bottom of it.

Also, I would like to rebase my PR if you guys are ok with this commit, because I would like to include Simon's fix for correct coloring of Scala keywords before trying to fix the issue I mentioned in the previous paragraph.