Loaded some code from os1, some corrections. Still needed to implement stack and some decisions with channel device.