Initial revision
many more changes to get system working