set ClsCompliant to true, fixed compiler warnings