Updated notes and code