Rewritten some code as I get to know CoffeeScript better.
Added support for expanding selection inside matching brackets.