Imported from https://github.com/lorenmt/vsl