Updated code for open source