Update code block and minor fixes