VQ and CSL fixes

Fixes removing the double edges for VQ and CSL.
Also, prevented copying of whole data in functions using
pass-by-reference.
Merge pull request #3 from tfranovic/master

VQ and CSL fix (double projections)