Embedded code partially removed, fixed minor syntax issues