first major work for SCE done. A couple TODO's remain, but I have to do my homework sometime... I feel sure that I am missing piles of hidden errors...