Initial commit of conversion from interal code to open source code