Initial commit of the second rewrite of the RTOS