Various additions for ksvc

code now compiles and is ready to test