remove some dead code from vcls
move custom c code to separate file