A much, much faster approach to lcsn. Also adds comments.