Adding basic OS primitives and a first working flow