Initial Copy From rchip, along with modifications for running.