More notes and preliminary code