Added simple subsystem routines and some other code.