A whole bunch of adapting VLC code