Fixed package statements and leftover main function in REngine. Fixed a few typos